GNOME Bugzilla – Bug 333737
__init__.py uses argv even when there is no argv.
Last modified: 2006-05-06 21:04:16 UTC
I think this code is new in pygtk 2.9/2.10, in __init__.py: _is_pydoc = False if sys.argv: name = os.path.basename(sys.argv[0]) if 'pydoc' in name: _is_pydoc = True This crashes: Traceback (most recent call last):
+ Trace 66750
if sys.argv:
when I use pygtk in a script when I embed python, because I am not providing any command-line arguments to the embedded python environments (I'm not even sure how to). It works fine with pygtk 2.8. Could pygtk 2.9 detect the lack of sys.argv and work past this, please?
You should call PySys_SetArgv under normal circumstances. But I guess that it's still worth fixing for 2.10.
Could this be related to: https://launchpad.net/distros/ubuntu/+source/pygtk/+bug/39035 ?
Fixed in CVS head.