Idle is not a command line shell, it is the python interactive interpreter. If you want to run your program in a command line, open a real command line (cmd.exe) and cd to whatever directory you put helloworld.py in. Then type "python helloworld.py".
2008/11/21 Ali art <[EMAIL PROTECTED]> > I am using Windows XP professional version 2002 Service pack 3. AMD > Athlon(TM)XP 2400+ 2.00GHz 992MB RAM. > I have download Windows x86 MSI Instaler (3.0rc2) Python 3.0rc2 Release: > 06-Nov-2008. > > I want to use source code file from Python Command line but I could not. > > Firstly i opened IDLE and clicked on File → New Window and pasted > #!/usr/bin/python > #Filename: helloworld.py > > print('Hello World') > and saved "helloworld.py" without quotes.Then i invoced pyton command > line. > Python 3.0rc2 (r30rc2:67141, Nov 7 2008, 11:43:46) [MSC v.1500 32 bit > (Intel)] > on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> python helloworld.py > and pressed enter > But it did not work gives the error > Python 3.0rc2 (r30rc2:67141, Nov 7 2008, 11:43:46) [MSC v.1500 32 bit > (Intel)] > on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> python helloworld.py > File "<stdin>", line 1 > python helloworld.py > ^ > SyntaxError: invalid syntax > >>> > Did i meke any misteke? I tried > Control Panel -> System -> Advanced -> Environment Variables. > System Variables -> C:\Python30 > but it still gives same error. > > ------------------------------ > Discover the new Windows Vista Learn > more!<http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE> > > -- > http://mail.python.org/mailman/listinfo/python-list > >
-- http://mail.python.org/mailman/listinfo/python-list