Sandro Tosi wrote: >>>>>>> import wxversion >>>>>>> wxversion.select('2.8') >>>>>>> from wx import * >>>>>>> wx.__version__ >>>> '2.8.7.1' >>>> >>>> That solves the problem of multi-wx on a system. >>>> >>>> What do you think about adding those 2 line into wx examples?
hmmm - only the examples? or should it be in the wx back-end itself? Maybe at least a version check? Anyway -- certainly the examples >>> Moreover, I will provide a patch to move from >>> >>>>>> from wx import * >>> to >>>>>> import wx who hoo! thanks! > AFAIUI, it's not possible to say "2.8+" == "2.8 and all the higher > versions", I think there is: http://www.wxpython.org/docs/api/wxversion-module.html you need: import wxversion wxversion.ensureMinimal('2.8') I think that will do it, but I haven't tested much -- I only have one version installed now. If it does work, I say we definitely ue it in the. Another option is to put it in the wx back-end in a try block: wxversion.ensureMinimal('2.4') Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/usr/local/lib/wxPython-unicode-2.8.9.1/lib/python2.5/site-packages/wxversion.py", line 181, in ensureMinimal raise AlreadyImportedError("wxversion.ensureMinimal() must be called before wxPython is imported") wxversion.AlreadyImportedError: wxversion.ensureMinimal() must be called before wxPython is imported which might be the safest, and would catch both pylab use, and people's home-written apps that need the wxversion call. thanks for working on this, -Chris -- Christopher Barker, Ph.D. Oceanographer Emergency Response Division NOAA/NOS/OR&R (206) 526-6959 voice 7600 Sand Point Way NE (206) 526-6329 fax Seattle, WA 98115 (206) 526-6317 main reception chris.bar...@noaa.gov ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel