[pygtk] popt question

Alex Roitman shura at alex.neuro.umn.edu
Tue Jun 15 10:45:11 WST 2004


I'm trying to work out the example from popt.py and few things are
not clear. 

Specifically, I can't seem to correctly parse something like this:

   ./myprog -i file1 -f format1 -i file2 -f format2 -o file3 -f format3

When the second "-i" (or -f, or -o) flags are supplied, they are being ignored.

At the same time, there's this mysterious "flags" field in the table
of arguments. I have a suspicion that this has to do with processing
multiple options. The gnome popt reference mentions parsing options in 
a loop, but I can't seem to draw parallels between that API and 
the popt.py example.

Could anybody please point me to the right direction?

Thanks in advance for any help,

Alexander Roitman   http://ebner.neuroscience.umn.edu/people/alex.html
Dept. of Neuroscience, Lions Research Building
2001 6th Street SE, Minneapolis, MN  55455
Tel (612) 625-7566   FAX (612) 626-9201
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.daa.com.au/pipermail/pygtk/attachments/20040614/2d7a007b/attachment.bin

More information about the pygtk mailing list