If you want to use Python with ready-to-be-used scripts just now, I suggest not to use Python 3 for a while. Install the latest Python 2.5 (http://www.python.org/ftp
Main Topics
Browse All TopicsBrand new to Python. I just downloaded and installed Python 3.1 from www.python.org . I can run python.exe at a command prompt and get:
Python 3.1 (r31:73574, Jun 26 2009, 20:21:35) [MSC v.1500 32 bit (Intel)] on win32
>>>
I try the simple Hello World it doesn't like it:
>>> print "Hello World"
File "<stdin>", line 1
print "Hello World"
^
SyntaxError: invalid syntax
(the caret is pointing to the closing " )
>>>
I discovered I can make it work if I add parentheses:
>>> print( "Hello World" )
Hello World
>>>
So that's my question. Why do I have to add parentheses when none of the test programs I find have them? Have I screwed up the installation somehow? (I got the ShowParams.py program to work by adding parentheses.)
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
If you want to use Python with ready-to-be-used scripts just now, I suggest not to use Python 3 for a while. Install the latest Python 2.5 (http://www.python.org/ftp
Business Accounts
Answer for Membership
by: efnPosted on 2009-08-16 at 22:24:46ID: 25111786
You have to add the parentheses because the Python version number starts with 3.
/whatsnew/ 3.0.html
Guido van Rossum wrote "Python 3.0, also known as Python 3000 or Py3K, is the first ever intentionally backwards incompatible Python release." In particular, print statements that would work with pre-3 versions of Python will not work in 3.x.
The change of "print" from a statement to a function is identified as a common stumbling block on this page on what's new in Python 3.0:
http://docs.python.org/3.1
If you want to use older books, tutorials, or sample programs, you might be better off running a pre-3 version of Python.