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
* 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
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
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
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
>
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
* 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
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
> 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
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
> 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
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'
* 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
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
* 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
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
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
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
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
* 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
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
21 matches
Mail list logo