[Tutor] getting python 3 to run from the command line
Mark Tolonen
metolone+gmane at gmail.com
Sat Nov 14 13:03:41 CET 2009
"Khalid Al-Ghamdi" <emailkgnow at gmail.com> wrote in message
news:dfac564f0911140040y27e0bee5ub02aa2de2b02fdbf at mail.gmail.com...
> Hi,
>
> for some reason I haven't been able to get python 3 to work from the the
> command line. I've added it to the the path in the the system variables
> but
> still no luck. when I try to run python 2.6 it works flawlessly, though,
> bearing in mind that it wasn't added to the system variables!
>
> i'm running windows vista and have python 30 ,31 and 26 installed.
>
> all of this , by the way, was just to get easy install to work so i can
> get
> nose working to do some practice of unit testing!
>
> can anyone shed some light on the issue?
How are you starting python? If you type 'python' and C:\Python31 is the
first thing in your path, you should see Python 3.1 execute. If you type
'somefile.py' the Windows command line uses the registered program for the
'.py' extension to run the script. It doesn't use the PATH. You can see
the default program for an extension from the command line with the 'assoc'
and 'ftype' commands:
C:\>assoc .py
.py=Python.File
C:\>ftype Python.File
Python.File="C:\Python26\python.exe" "%1" %*
-Mark
More information about the Tutor
mailing list