Kash <[EMAIL PROTECTED]> wrote: >Hi Everyone, > >I am new to python. I have just installed it. I am went to the python >website and used it to download python and a beginners tutorial. I set >the environment variables as explained in the faq. >However when I start idle and run a program from it; I get the >following types of errors; however I can run the same programs no >problem from my command prompt. >Can anyone please tell me what I am doing wrong? I thought Idle was >used to test programs in. I am able to open a new window and write >code, save it and then run that code; but just not if I type it into >the main idle window directly. >Any help would greatly appreciated, thank you. >Kash > >This is my error: >---------------------------- >IDLE 1.1 >>>> python hello.py >SyntaxError: invalid syntax >>>> python hello >SyntaxError: invalid syntax
Idle is already running the python interpreter. You don't need to start another copy. It is just like you had typed "python" at a command line. If you want to run a script in a file, you have to use the IDLE menu to do so. I don't know IDLE, but it's probably something like File->Run. >>>> exit >'Use File/Exit or your end-of-file key to quit IDLE' >>>> print "Hello" >Hello THAT'S the way you use IDLE. -- - Tim Roberts, [EMAIL PROTECTED] Providenza & Boekelheide, Inc. -- http://mail.python.org/mailman/listinfo/python-list