[wxPython-users] GUI2Exe - Change Python version?
Mike Driscoll
mdriscoll at co.marshall.ia.us
Wed Jan 9 14:34:43 PST 2008
Andrea and Aaron,
> -----Original Message-----
> From: Aaron Brady [mailto:castironpi at comcast.net]
> Sent: Wednesday, January 09, 2008 4:17 PM
> To: wxPython-users at lists.wxwidgets.org
> Subject: RE: [wxPython-users] GUI2Exe - Change Python version?
>
> 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?
>
I was starting to think along the same lines, but didn't try it as I've
been having a lot of other program issues to iron out at work. Just
picking the correct path to pass to the cmd makes sense to me though. So
in my case, it would be something like this for 2.4:
cmd = r'c:\python24\python -u "%s" %s %s'%(tmpFileName, self.compiler,
dryRun)
and for 2.5:
cmd = r'c:\python25\python -u "%s" %s %s'%(tmpFileName, self.compiler,
dryRun)
Maybe I'll take a whack at it tomorrow and see if it works.
Thanks for the ideas.
Mike
More information about the wxpython-users
mailing list