Where does my output go?

Michael Abbott michael at rcp.co.uk
Wed Sep 5 11:20:38 EDT 2001


"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 194.238.50.13...
>> So, I write a small bit of Python (one line):
>>
>> write.py
>> --------
>>     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.



More information about the Python-list mailing list