[Tutor] getting python 3 to run from the command line (version 2)

Alan Gauld alan.gauld at btinternet.com
Sat Nov 14 19:56:04 CET 2009

"Khalid Al-Ghamdi" <emailkgnow at gmail.com> wrote

> when i try to code something it just gives me a new line without any
> processing of the code. (for example:2+2 returns a new line)

You mean you get to the >>> prompt?
And you type 2+2 you get this:

>>> 2+2


With just a newline between your input and the next >>> prompt?

> when I tried to change the path to the directory that contains python 31 
> and
> enter *python (c:\python31>)*,

I'm not surprised it doesn't work, that should have python trying to start
executing a folder. But....

> *fatal python error: Py_Initialize: can't initialize sys standard streams

I get a very different message:

C:\Documents and Settings\Alan Gauld>python (C:\Python31)
python: can't open file '(C:\Python31)': [Errno 22] Invalid argument

> When i change the directory to c:\python26 and then enter it works ok.
> so can anyone tell me why this is happening?

Nope, sorry, I don't understand how the 2.6 version works if
you are passing in a folder as you did for 3.1

Do you know how to cut n paste from a cmd window>
It would probably help if you pasted in the actuall sessions
into your mail.


Alan Gauld
Author of the Learn to Program web site

More information about the Tutor mailing list