Home || Syllabus || Readings || Resources

Python Programming Resources

Software from python.org

Mac Users: Possible Idle Error Message and how to fix it:

If you are running Mac OS 10.9 (Mavericks) you may see the following error message when launching IDLE:

WARNING: The version of Tcl/Tk (8.5.9) in use may be unstable.

If so, you should quit IDLE and install ActiveTcl version # 8.5.15.0 from this website http://www.activestate.com/activetcl/downloads.

Notes:

Notes on using Python’s IDLE in Windows:

In order to set a default directory for your programs so that Python does not save them with the rest of Python, you can reconfigure the shortcut on your desktop to specify your own working directory. To do that, right-click on the shortcut on your desktop and choose Properties. In the “Start In:” line, enter your own folder, for example C:PythonClass and then click OK.

Notes on De-bugging in Python’s IDLE:

Python eBook available at the Bobst:

Online open source textbook (also available in paperback for cost):

Think Python: How to Think Like a Computer Scientist
By Allen B. Downey
Publisher: O'Reilly Media, 2012
Print ISBN: 978-1-4493-3072-9 | ISBN 10: 1-4493-3072-X
Ebook ISBN: 978-1-4493-3071-2 | ISBN 10: 1-4493-3071-1
http://shop.oreilly.com/product/0636920025696.do
Available on-line: http://www.greenteapress.com/thinkpython/

Online Tutorials and fun pages

Additional Python IDE

Online Resources and documentation:

Additional resources will be added throughout the semester.

Some of the differences Between Python 2.x and Python 3.x

Topic Python 2.x Python 3.x
Print statement print ‘Hello, World!’ print(‘Hello, World’)
Data entry: text name = raw_input(‘What is your name? ‘) name = input(‘What is your name? ‘)
Data entry: numbers (values) age = input(‘What is your age? ‘) age = input(‘What is your age? ‘)
age = int(age)
Integer arithmetic: division
>>> 7/2
3

[ where 7 and 2 are integers]

>>> 7/2
3.5
>>> 7//2
3

Working with NLTK: Natural Language Toolkit