[Tutor] trouble using 2to3.py

Alan Gauld alan.gauld at btinternet.com
Tue Nov 3 21:33:27 CET 2009


"Richard D. Moores" <rdmoores at gmail.com> wrote

>> Or the way I do it, have python31.bat and python26.bat, which launch the
>> exact pythons that I want.
>
> Thanks, Dave. I'm not familiar with .bat files. Could you give me a
> look at one of them?

A bat file is just a file of "DOS" commands and ends in .bat

so python31.bat

will contain the single line

C:\path\ro\python\31\python.exe %*



The %* is a placeholder for any commandline arguments you give
when calling the batch file -  like sys.argv in python.

You then call it with

python31 myscript.py


There is a brief discussion and example of a bat file in the intro
to my tutor, in the What is Programming topic.

HTH,

-- 
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/





More information about the Tutor mailing list