En Thu, 26 Apr 2007 04:04:30 -0300, Pieter Edelman <[EMAIL PROTECTED]> escribió:
> Now, one of the users has quite a lot of info files, and asked me if > it's possible to use a wildcard in specifying these, so he would just > have to do: > ./myprog.py -t *.gpx *.jpg > > This seems like a sensible option at first sight, but it's difficult > to implement because the wildcard is expanded by the shell, so > sys.argv gets a list containing "-t", all .gpx files and all .jpg > files. With this list, there's no way to tell which files belong to > the "-t" switch and which are arguments (other than using the > extension). I can't verify right now, but I think that using -t "*.gpx" would avoid the shell expansion. (Or perhaps '*.gpx' or \*.gpx or even -t*.gpx) -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list