On Tue, Dec 6, 2016 at 5:02 AM, BartC <b...@freeuk.com> wrote: > If the syntax is: > > program filespec > > or: > > program filespec file > > how do you tell whether the last file in an argument list is the optional > 'file', or the last file of the expansion of 'filespec'?
Why should you care? I have used shell globbing to pass precisely two parameters to a program. More often, I use this syntax, which Windows simply doesn't support: ffmpeg -i some-really-long-file-name.{avi,mkv} to convert a file from one format to another. And if the .mkv file already exists, I can just use ".*" at the end, although that does depend on them being in alphabetical order. The shell is predictable and therefore useful. This trick is guaranteed to work, no matter what program I'm using. On Windows, I have to hope that the program expands these notations correctly. ChrisA -- https://mail.python.org/mailman/listinfo/python-list