On Mar 15, 2:04 pm, William Hudspeth <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am needing to pass an argument to the Popen function of the Subprocess
> module that includes a wildcard in the filename. It seems that Popen is
> not able to expand wildcards, and treats a filename that includes a
> wildcard as a literal.
>
> EX.
>
> var1="/path_to_files/filnames*.doc"
> result=Popen(["command",var1]).wait()
>
> Can anyone tell me how I can work around this problem?
>
> Thanks, Bill

What are you doing, exactly? IF you are just passing in a random
filename, you could do something like this:

var1 = "/path_to_files_/%s" % (filename)

where filename is another variable.

You might also look into using os.system which allows just about any
command line options to be used.

Hope this helps.

Mike

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to