Tony Cappellini wrote:
I believe I know how I corrupted my wx installation.
In Ctrl panel, My the path to my current python installation is set like this
C:\stuff;%PYTHONHOME%;C:\OtherStuff
PYTHONHOME=C:\Python25I frequently need to go back and forth between python 2.4 & 2.5, but
at the moment, I only have wx installed for 2.5.When I switch between python versions, sometimes I do this only in a
console window by typing PYTHONHOME=C:\Python24, so the change goes
away when the console closes.Last night when I was working on a 2.4 project, I went to control
panel and changed PYTHONHOME=C:\Python24 in the system wide
environment variableToday, without restoring PYTHONHOME to 2.5, I launched PaAlaMode, but
it never displayed itself. I then tried the wx Demo launcher-same
problem.I then remembered I had switched PYTHONHOME to Python2.4, so I
switched the environment variable back to python2.5, but now my wx
installation is corrupt. No wx programs run.
I bet if you reboot so the environment variables will be reloaded system-wide then it would work.
I have no choice but to re-install wx.
Short of remembering to restore the control panel variable back to
2.5, is there a better way to deal with multiple versions of Python
installations and multiple versions of wx?
I don't think I would use the PYTHONHOME environment variable, because Python itself uses that for knowing where to find itself. So if you had it set to your 2.4 dir and ran 2.5 it would try looking in the 2.5 dir for the Lib and other stuff. However if PYTHONHOME is not set then Python will use the location of the .exe to know where to look, which is exactly what you want. You just want a way to choose which Python is executed by default when the PATH is searched, right? So really, any variable name would work, and it could contain anything from the whole path of the python dir down to the just the version numbers, like this:
CURRENTPYTHON=25
C:\stuff;c:\Python%CURRENTPYTHON%;C:\OtherStuff
Also, Python doesn't have to be on the PATH for it to be able to be used. You can modify the shortcut's properties to use the full path to the specific Python that you want to be used for running the app, instead of relying on the default.
ยทยทยท
--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!