On Mon, Jun 29, 2009 at 3:59 AM, Christian Witts<cwi...@compuscan.co.za> wrote: > l...@ithstech.com wrote: >> >> Have I installed something incorrectly in Python 3.1 for Mac if I get a >> syntax error on >> >> print "hello world" >> >> My Python 2.3.5 executes this just fine. What have I missed? > > Please take a read through http://docs.python.org/3.0/whatsnew/3.0.html for > a list of changes from the 2.x series to 3.x. It includes the fact that the > print command is now a function and needs to be called accordingly, ie. > print("Hello world!")
in addition to reading the "What's New" document, you should also be aware that there is a "2to3" tool that comes with Python that helps port your existing Python 2 scripts to be as 3.x-compliant as they can. hope this helps! -- wesley - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - "Core Python Programming", Prentice Hall, (c)2007,2001 "Python Fundamentals", Prentice Hall, (c)2009 http://corepython.com wesley.j.chun :: wescpy-at-gmail.com python training and technical consulting cyberweb.consulting : silicon valley, ca http://cyberwebconsulting.com _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor