getopts confusion
Chris Lawrence
quango at watervalley.net
Fri Jun 29 20:19:09 EDT 2001
In article <mailman.993845146.8762.python-list at python.org>, "Rob
Brown-Bayliss" <rob at zoostation.cc> wrote:
> On 29 Jun 2001 08:13:50 -0400, Steve Holden wrote:
>> > Error on option -s: unknown option.
>> > Run './gearbox.py --help' to see a full list of available command
>> > line options.
>
> I have checked indentation, it's fine.
>
>
>> I conclude that the getopt code is working correctly, but your
>> application is somehow failing to test for the options.
>>
>> Hope this helps.
>
> Yes, some. I played around some more, and the app that fails has a GUI,
> the other is a command line app. There is a single import I do (from
> gnome.ui import *) that stuffs it up, if the getopt stuff comes before
> this import I don't get that error, if I cut and paste the getops till
> after this import I get the above error.
>
> Does any one know why?
IIRC gnome.ui does some options processing when it is imported (actually
the GNOME libraries do it). This may be the cause of the problem
you're having. I dunno if there's any way to get around it.
Chris
More information about the Python-list
mailing list