newbie question

lance crocker jnlc at bellsouth.net
Wed Oct 31 14:03:02 EST 2001


this is an actual exert from a tutorial i got off the net. 

Programming tutorials since the beginning of time have started with a
little program called Hello, World! So here it is: 

print "Hello, World!"

If you are using the command line to run programs then type it in with
a text editor, save it as hello.py and run it with ``python
hello.py'' 

Otherwise go into IDLE, create a new window, and create it as in
section 1.4. 

When this program is run here's what it prints: 

Hello, World!

i did evrything that it asked me to do but i keep getting syntax
errors. i tried running it in DOS but it then gives me a bad command
or file name error.

I want to get this fixed b/c how can i use progs with out being able
to run them? 

On Wed, 31 Oct 2001 09:47:58 -0800, Erik Max Francis <max at alcyone.com>
wrote:

>Emile van Sebille wrote:
>
>> " 1" <jnlc at bellsouth.net> wrote in message
>> news:yXVD7.6251$QL2.175221 at e3500-atl1.usenetserver.com...
>>
>> > When I got to run the file (by typing python hello.py)i get this
>> > error
>> > message:
>> >
>> > >>> python hello.py
>> > SyntaxError: invalid syntax
>> > >>>
>	...
>> 
>> You've got a syntax error in the file, probably extra spaces
>
>No, look closely -- he's typing "python hello.py" in the Python
>interpreter itself.
>
>-- 
> Erik Max Francis / max at alcyone.com / http://www.alcyone.com/max/
> __ San Jose, CA, US / 37 20 N 121 53 W / ICQ16063900 / &tSftDotIotE
>/  \ Laws are silent in time of war.
>\__/ Cicero
>    Esperanto reference / http://www.alcyone.com/max/lang/esperanto/
> An Esperanto reference for English speakers.





More information about the Python-list mailing list