En Thu, 14 Jan 2010 08:21:28 -0300, luis <soli...@gmail.com> 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 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 way.
(I've written a variant of the same idea but isn't ready yet)

Or, you can always invoke your scripts with an explicit interpreter. Create a python24.cmd file containing just this line:

@c:\path\to\python.exe %*

(and a similar one for 2.6 and 3.0) and put them somewhere in your path (it is convenient to add a single directory to the system PATH for your own utilities; I use c:\util; others use c:\bin).

Then you can say:

python26 foo.py

to execute foo.py using Python 2.6

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to