Access to raw command line?

Grant Edwards grante at visi.com
Thu Apr 26 09:37:42 EDT 2007


On 2007-04-26, Pieter Edelman <p.edelman at gmail.com> wrote:
> Hi,
>
> I'm currently writing a command-line program in Python, which takes
> commands in the form of:
> ./myprog.py [OPTIONS] ARGS
> So pretty standard stuff. In my case, ARGS is a list of image files.
>
> One of the possible options is to specify a file holding information
> about the photos. You'd specify it with (in this particular case) the -
> t switch, and you can specify multiple files by repeating this switch:
> ./myprog.py -t info1.gpx -t info2.gpx -t info3.gpx *jpg
>
> 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,

You should buy a new keyboard.  The latest ones have quote
keys -- both single _and_ double!

-- 
Grant Edwards                   grante             Yow! What PROGRAM are they
                                  at               watching?
                               visi.com            



More information about the Python-list mailing list