Windows command line not displaying print commands

John Machin sjmachin at lexicon.net
Mon Mar 30 18:28:37 EDT 2009


On Mar 31, 8:37 am, Irmen de Jong <irmen.NOS... at xs4all.nl> wrote:
> JonathanB wrote:
> > Ok, I'm sure this is really simple, but I cannot for the life of me
> > get any print statements from any of my python scripts to actually
> > print when I call them from the windows command line. What am I doing
> > wrong?
>
> > hello.py:
> > print "Hello World!"
>
> > command line:
> > E:\Python\dev>python hello.py
>
> > E:\Python\dev>
>
> Does just typing:
>
>    python
>
> give you an interactive prompt at all?
>
> Or do you have a module in your E:\Python\dev directory called 'os', 'sys' or something
> else that may clobber one of the default library modules.

or perhaps there's a file named python.bat that does nothing.

What directory is Python installed in? What does your Windows PATH
look like? Is this your very first attempt to do anything at all with
Python or have you managed to get any output from a Python script
before? If the latter, what have you changed in your environment? Does
E: refer to a removable disk?




More information about the Python-list mailing list