William Hudspeth <[EMAIL PROTECTED]> wrote: > [ ... ] 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()
You want: result = Popen(["command", var1], shell=True).wait() See the subprocess docs on using Popen instead of "older functions" (especially os.system): http://docs.python.org/lib/node534.html . You might also want a look at subprocess.call() . -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ ___ | "Frankly I have no feelings towards penguins one way or the other" \X/ | -- Arthur C. Clarke her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- http://mail.python.org/mailman/listinfo/python-list