Changeset 252


Ignore:
Timestamp:
07/31/09 16:15:38 (3 years ago)
Author:
rkuck
Message:

Reworked around pygtk implicit use of argv

We just rewrite sys.argv before including gtk. Not the nicest way to
handle this, but there seems to be no explicit way to initialize GTK
from Python (and thus to provide a correct set of command-line
arguments).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/avango-inspector/src/avango/inspector/__init__.py

    r245 r252  
    33import pygtk 
    44pygtk.require('2.0') 
     5import sys 
     6# We need to 'cleanup' sys.argv as gtk just grabs what is there. 
     7# Note: This means that GTK options can not be set via the command-line 
     8argv = sys.argv 
     9sys.argv = argv[:1] 
    510import gtk 
    6 import sys 
     11sys.argv = argv 
     12# 
    713import cStringIO 
    814import subprocess 
Note: See TracChangeset for help on using the changeset viewer.