Where does my output go?

Gerhard Häring g.haering at ___skynamics.com.invalid
Wed Sep 5 18:01:06 CEST 2001

Michael Abbott wrote:
> "Maan M. Hamze" <mmhamze at pleiades.net> wrote in 
> news:tpcfiohb7crq2c at corp.supernews.com:
>>"Michael Abbott" <michael at rcp.co.uk> wrote in message
>>news:Xns91139DA18A194michaelrcpcouk at
>>>So, I write a small bit of Python (one line):
>>>    print 'hello'
>>>I then run it from the command line:
>>>    C:\TEMP>write
>>>    Hello
>>I do not understand this step here.  How are you running write as an
>>executable? and why is it printing Hello not hello?
> Oops.  My mistake.  I cut and pasted the output, but unfortunately, I 
> didn't cut and paste the source code!  The source code should, of course, 
> be
>     	print 'Hello'
> As to why running it from the command line (with or without a .py 
> extension) works?  Indeed, that is a mystery, one of the many mysteries of 
> this <irony>marvellous</irony> operating system we use.
>     	It's something to do with how the .py extension is registered, I know 
> that much.

C:\temp\e>copy con: write.py
print "Hello."
         1 Datei(en) kopiert.
C:\temp\e>write.py >out.txt
C:\temp\e>type out.txt
C:\temp\e>echo %OS%

Actually version 5 SP2 aka Windows 2000. Windows 9x/ME console is known 
to be buggy.

Gerhard Häring
skynamics AG
g.haering at skynamics.com

More information about the Python-list mailing list