[pygtk] Can't run PyGTK more than once from embedded Python

Romain Behar romainbehar at yahoo.com
Mon Jan 9 22:56:21 WST 2006


> That is significant.  In my case, I *had* to
> start a new interpreter in order to guarantee
> that each execution of the script was running
> in a pristine environment.  I made the mistake
> of assuming you had a similar need.  (I also
> somehow assumed you were running on Windows...)

My application also runs on Windows, I'm just doing
development under Linux. But the behavious (good or
bad) has been consistent on both platforms.

> Just keep in mind that it is very difficult
> to completely "clean up" a python interpreter
> and that there is the possibility that when
> you launch a script it might be influenced by
> a previous script.  For example, module
> attributes set by one script will likely be
> visible to subsequent scripts.  As long as you
> are aware of that and it isn't a problem for
> your application, life is much easier if you
> create one embedded Python interpreter and
> allow it to live for the duration of your
> main program.

I'd be happy to know how to successfully run a new
Python interpreter that is able to run a PyGTK script
again, because using the same Python engine instance
isn't enough for my needs: creating or opening a new
document inevitably creates a new interpreter and I
run into that bug again.

 Cheers,

  Romain



		
__________________________________________ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 



More information about the pygtk mailing list