We already check the pygtk version by using gtk.pygtk_version.
pygtk.require() is more of a migration tool to help people move from
pygtk 1.0 to 2.0 when they still have both versions installed on the
same machine, and for some reason pygtk 1.0 is given preference in
I searched backend_wx.py and backend_wxagg.py to find wx.__version__ but
did not find it. So does that mean the wx backend does not need to use
Send instant messages to your online friends http://au.messenger.yahoo.com
On Fri, 2005-07-15 at 20:28 -0700, > firstname.lastname@example.org wrote:
> I'm not familiar with pygtk.require(), but if it's anything like
> Don't Get Rid of It!
> No matter how hard we all try, packages are not totally backward
> compatible. Having a dependency without any version info in it is the
> road to hard to identify bugs. If matplotlib has been tested only with
> certain versions of pygtk, it's quite reasonable that folks get an error
> message if they try to run it with other versions. To do otherwise would
> be like having a dynamically linked app with non-version dynamic libs.
> That being said, perhaps pygtk.require(), or the way it is being used,
> is not very well suited to this task. With wxversion, the select call
> must be made before any imports of wx. Thus, it should only be called in
> __main__. If you have a module (like matplotlib) that has been tested
> against certain versions, you should test for the version by checking
> wx.__version__, rather than calling wxversion.select(). The exception to
> this might be pylab for interactive use, where it is acting as the first
> importer of wx.
> So, my suggestion is that if pygtk.require() is causing more trouble
> than it's worth, then figure out how to use it differently, rather than
> scrapping it all together.