Re: maintain 2 versions of python on my computer

2010-01-22 Thread Duncan Booth
a...@pythoncraft.com (Aahz) wrote: > In article , > Duncan Booth wrote: >> >>That seems overkill. This does pretty much the same thing: >> >> @(C:\Python26\Python -x %~f0 %* || pause) && goto:EOF >> import sys >> print sys.version >> # raise RuntimeError # uncomme

Re: maintain 2 versions of python on my computer

2010-01-22 Thread Alf P. Steinbach
* Aahz: In article , Duncan Booth wrote: That seems overkill. This does pretty much the same thing: @(C:\Python26\Python -x %~f0 %* || pause) && goto:EOF import sys print sys.version # raise RuntimeError # uncomment to trigger the 'pause' What version of Wi

Re: maintain 2 versions of python on my computer

2010-01-22 Thread Aahz
In article , Duncan Booth wrote: > >That seems overkill. This does pretty much the same thing: > > @(C:\Python26\Python -x %~f0 %* || pause) && goto:EOF > import sys > print sys.version > # raise RuntimeError # uncomment to trigger the 'pause' What version of Windows is

Re: maintain 2 versions of python on my computer

2010-01-18 Thread Gertjan Klein
Duncan Booth wrote: > @(C:\Python26\Python -x %~f0 %* || pause) && goto:EOF > import sys > print sys.version > # raise RuntimeError # uncomment to trigger the 'pause' That is nice! This should probably be in the documentation, here: http://docs.python.org/using/cmdline.ht

Re: maintain 2 versions of python on my computer

2010-01-17 Thread Sridhar Ratnakumar
On 1/14/2010 3:23 PM, Lie Ryan wrote: On 01/14/10 22:21, luis wrote: > > Hi > > I am not an expert in programming and using Python for its simplicity > > I have 2 versions of python installed on my computer (windos xp) to > begin the transition from version 2.4 to 2.6 or 3. maintaining the >

Re: maintain 2 versions of python on my computer

2010-01-17 Thread Gabriel Genellina
En Sat, 16 Jan 2010 05:16:14 -0300, Gertjan Klein escribió: Gabriel Genellina wrote: En Thu, 14 Jan 2010 08:21:28 -0300, luis escribió: Is there any way to indicate the version of the python interpreter must use a script? See http://www.effbot.org/zone/exemaker.htm It uses the #! line

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Alf P. Steinbach
* Gertjan Klein: Alf P. Steinbach wrote: * Gertjan Klein: Alf P. Steinbach wrote: Thinking about it some more, perhaps that way I can't get at return codes a python script might provide. I haven't used those, but they may be useful at some point. Return codes work OK no matter what. Ok, I

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Duncan Booth
Mike wrote: >> That seems overkill. This does pretty much the same thing: >> >>         @(C:\Python26\Python -x %~f0 %* || pause) && goto:EOF >>         import sys >>         print sys.version >>         # raise RuntimeError # uncomment to trigger the 'pause' >> > > Indeed! Must be as close to a

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Mike
> That seems overkill. This does pretty much the same thing: > >         @(C:\Python26\Python -x %~f0 %* || pause) && goto:EOF >         import sys >         print sys.version >         # raise RuntimeError # uncomment to trigger the 'pause' > Indeed! Must be as close to a "Windows shebang line" a

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Duncan Booth
Mike wrote: > t does not; Windows associates applications with file extensions. > However, I have used something like this to get something like the > Unix shebang behavior: > > @echo off > rem = """ ver26.bat: Python 2.6 > C:\Python26\python -x %~f0 %* > goto END > rem """ > # ver26.py wrapped

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Mike
> On unix you would start the file with a "hashbang" e.g. > > #!/usr/bin/python3 > > Fraid I don't know if that works on XP though. > > Roger. It does not; Windows associates applications with file extensions. However, I have used something like this to get something like the Unix shebang behavior

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Gertjan Klein
Alf P. Steinbach wrote: >* Gertjan Klein: >> Alf P. Steinbach wrote: >> >> Thinking about it some more, perhaps that way I can't get at return >> codes a python script might provide. I haven't used those, but they may >> be useful at some point. > >Return codes work OK no matter what. Ok, I won'

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Alf P. Steinbach
* Gertjan Klein: Alf P. Steinbach wrote: * Gertjan Klein: What I've been thinking about is to write a single [Windows] executable that gets associated with .py and .pyw (instead of python.exe itself). Well, you need two: one for console subsystem, and one for GUI subsystem. Why? I'd have im

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Gertjan Klein
Alf P. Steinbach wrote: >* Gertjan Klein: >> >> What I've been thinking about is to write a single [Windows] executable that >> gets associated with .py and .pyw (instead of python.exe itself). > >Well, you need two: one for console subsystem, and one for GUI subsystem. Why? I'd have imagined wr

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Alf P. Steinbach
* Gertjan Klein: What I've been thinking about is to write a single [Windows] executable that gets associated with .py and .pyw (instead of python.exe itself). Well, you need two: one for console subsystem, and one for GUI subsystem. Happily you can use the same source code. :-) This execu

Re: maintain 2 versions of python on my computer

2010-01-16 Thread Gertjan Klein
Gabriel Genellina wrote: >En Thu, 14 Jan 2010 08:21:28 -0300, luis escribió: > >> Is there any way to indicate the version of the python interpreter >> must use a script? > >See http://www.effbot.org/zone/exemaker.htm >It uses the #! line to determine which version to load, resembling the >Unix

Re: maintain 2 versions of python on my computer

2010-01-14 Thread Lie Ryan
On 01/14/10 22:21, luis wrote: > > Hi > > I am not an expert in programming and using Python for its simplicity > > I have 2 versions of python installed on my computer (windos xp) to > begin the transition from version 2.4 to 2.6 or 3. maintaining the > operability of my old scripts > > Is the

Re: maintain 2 versions of python on my computer

2010-01-14 Thread r0g
luis wrote: > Hi > > I am not an expert in programming and using Python for its simplicity > > I have 2 versions of python installed on my computer (windos xp) to > begin the transition from version 2.4 to 2.6 or 3. maintaining the > operability of my old scripts > > Is there any way to indicate

Re: maintain 2 versions of python on my computer

2010-01-14 Thread Gabriel Genellina
En Thu, 14 Jan 2010 08:21:28 -0300, luis escribió: I am not an expert in programming and using Python for its simplicity I have 2 versions of python installed on my computer (windos xp) to begin the transition from version 2.4 to 2.6 or 3. maintaining the operability of my old scripts Is ther

Re: maintain 2 versions of python on my computer

2010-01-14 Thread Alf P. Steinbach
* luis: Hi I am not an expert in programming and using Python for its simplicity I have 2 versions of python installed on my computer (windos xp) to begin the transition from version 2.4 to 2.6 or 3. maintaining the operability of my old scripts Is there any way to indicate the version of the

maintain 2 versions of python on my computer

2010-01-14 Thread luis
Hi I am not an expert in programming and using Python for its simplicity I have 2 versions of python installed on my computer (windos xp) to begin the transition from version 2.4 to 2.6 or 3. maintaining the operability of my old scripts Is there any way to indicate the version of the python in