Hi

You need to remove from sys.argv the options you processed before invoking the
command line option parser from gnome. 
You may also want to use gnome-popt to specify to the libgnome the command line
options your application is aware of.

Hope this helps


Fr�d�ric

Quoting Roland Mas <[EMAIL PROTECTED]>:

> Hi there,
> 
> I'm still using Glade and the Glade library on Python.  My problem
> might concerns the Gnome lib more than the Gtk binding, if so please
> redirect me to the appropriate mailing list/newsgroup.
> 
>   The problem is about the way 'import libgnome.ui' eats my command
> line arguments (CLA).  If I 'import libgnome.ui' first thing, this
> import will parse all the CLA, so I won't be able to parse mine: if I
> use one of mine on the CL, I get
> Error on option --shared-dir=/space/shared/Dde/: unknown option.
> Run './monitor.py --help' to see a full list of available command line
> options.
> 
>   If on the other hand, I
> 1. parse my CLA with getopt, and
> 2. import libgnome.ui,
> I have to tell getopt of all the possible Gnome CLA, parse its
> results, rebuild a sys.argv [1:] with the Gnome CLA (thus removing my
> own CLA from it).
> 
>   In a word, that sucks.
> 
>   Is there a means to tell libgnome.ui not to parse sys.argv?  Or to
> parse it with some of my CLA (would be best if it just ignored them,
> and rebuilt a sys.argv afterwards)?  Better even, is there a way to
> automatically get the full arg list passed by libgnome.ui to getopt?
> I guess that would be the best solution, since I could just ignore
> them.
> 
>   Any experience in that field?
> 
> Thanks,
> Roland.
> -- 
> Roland Mas
> 
> Il vaut mieux insulter une commode Louis XV qu'une armoire � glace.
> 
> _______________________________________________
> pygtk mailing list   [EMAIL PROTECTED]
> http://www.daa.com.au/mailman/listinfo/pygtk
> 

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to