[wxPython-users] GUI2Exe - Change Python version?

Andrea Gavana andrea.gavana at gmail.com
Wed Jan 9 14:30:03 PST 2008


Hi Aaron,

On Jan 9, 2008 11:17 PM, Aaron Brady wrote:
> Hi,
>
> > -----Original Message-----
> > From: Andrea Gavana [mailto:andrea.gavana at gmail.com]
> > Sent: Wednesday, January 09, 2008 4:09 PM
> >
> > On Jan 9, 2008 11:02 PM, Aaron Brady wrote:
> > > > -----Original Message-----
> > > > From: Andrea Gavana [mailto:andrea.gavana at gmail.com]
> > > > Sent: Wednesday, January 09, 2008 3:56 PM
> > > >
> > > > machine, but it looks to me you just need to change the PATH system
> > > > variable to make your PC aware on where "python.exe" lives. So, for me
> > > > at the moment, the console command "python" just invokes
> > > > C:\Python25\python.exe. If the Python versions switch is as easy as
> > >
> > > Does GUI2Exe work by invoking a local Python instance on your distro.
> > > machines?  Or does it include Python zipped into the EXE?  That is, do
> > you
> > > want to vary the Python version at compile-time or at run-time?
> > ...
> > # Build the compilation command
> > cmd = 'python -u "%s" %s %s'%(tmpFileName, self.compiler, dryRun)
> > ...
> > self.pid = wx.Execute(cmd, wx.EXEC_ASYNC, self.process)
>
> How about just:
>
> pypath= 'c:\\python24'
> cmd = '%s\\python -u "%s" %s %s'%
>         (pypath, tmpFileName, self.compiler, dryRun)
>
> Change by hand or in a menu, no sys.path or %PATH% change?

Yes, this was my original thought too, but this approach imply that
Python lives under C:/Python24 (or C:/Python25 or whatever version we
want), which is not always the case. Someone might install Python
under D:/Program Files/Python24 for example, although I never
encountered such a case. There are obvious workarounds to this
problem, I just wanted to hear different opinions on how best
implement this in GUI2Exe.

Andrea.

"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.alice.it/infinity77/




More information about the wxpython-users mailing list