Using wildcards with Popen in the Subprocess module
William Hudspeth
wbhk at unm.edu
Thu Mar 15 17:46:12 EDT 2007
Hello Mike,
Thanks for responding. I need to pass multiple filenames to an
executable. The filenames are similar to one another, but differ only
slightly, hence the use of the wildcard. The executable works well from
the command line if I pass in a wildcard filename, but Popen can't
expand the wildcard.
>From command line:
% command /path_to_files/filename*.doc
With Popen:
var1="/path_to_files/filnames*.doc"
result=Popen(["command",var1]).wait()
Thanks, I will look into the os.system route.
Bill
More information about the Python-list
mailing list