On Mon, Nov 29, 1999 at 11:52:19AM +0100, Andreas Degert wrote:
> Erik B�gfors <[EMAIL PROTECTED]> writes:
>
> > Hi all!
> >
> > Two weeks ago I discovered python and that it was great for doing
> > gnome/gtk-development.
> >
> > I am currently writing a program that should be able to use a panel-applet
> > if you want it to. I would like to be able to use --noapplet or something
> > simular to NOT run the applet.
> >
> > When the program gets to the "import gnome.applet"-line it parses the
> > arguments given to the program and says Error on option --noapplet: unknown
> > option. So using getopt or just reading the argv doesn't work.
> >
> > I know the gnome-stuff uses popt to parse the arguments but I cannot find
> > any way to access them from within python.
> >
> > Maybe I could do the parsing first and then import gnome.applet only after
> > removing some arguments from argv but that is NOT a good way to solve the
> > problems.
>
> That's also what I did to work around that problem. What would be a
> better way to initialize the python module for gnome ? I'm also not
> convinced of the way how it is done now, but at least its convenient
> for simple applications.
>
> One way to solve it might be to define gtk.py, gnome/ui.py,
> gnome/applet.py as simple wrappers which contain an init-function and
> import some other lower-level module (e.g. gtk_uninitialized.py)
> which contains the real code. Then one could only import the
> lower-level module and call the init-function later manually.
>
Why not just create a popt module? Or include that stuff in
gnome-python!? Shouldn't be to hard for someone who's know about gnome
and python programming I would think.
Or am I just wrong?
/Erik
--
Erik B�gfors | http://www.acc.umu.se/~bagfors/
Email: [EMAIL PROTECTED] | Center for Parallel Computers
GSM +46 70 398 54 43 | Supporter of free software
To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]