Is there a way, I can execute in python a bash command with expansion: *
I tried thousand ways with no luck.
Actually I want to have a python script which enters each directory in the current dir, and executes a given bash command there (possibly a bash command with an expansion: *).
filter(os.path.isdir, os.listdir(os.curdir))lists all subdirectories of the current directory including those that starts with a dot (.)shell=Trueexecutes command given ascmdstring through the shell.*if present is expanded by the shell as usualcwd=dirnametells that the command should be executed indirnamedirectory