pycontext

Python Programming in Context-Second Edition

Throughout this second edition, we have made a number of small corrections and revisions that aim to provide clearer presentation of the material.  We have updated all references to the cTurtle module to reflect the standard Python 3 turtle module and have also updated all references to the urllib module.





Textbook Resources











Resources for the First Edition of Python Programming in Context



Textbook Resources for Python 3.x


A Note about the cTurtle Module

If you are using idle, some of the initial interactive examples will appear to hang. This is due to some weird threading interactions between the IDLE GUI and the shell. The problems are frustrating when you run into them in the first chapter. However as you write programs longer than 4 or 5 lines that include the exitOnClick call, and start to use the editor they dissappear quickly. A couple of suggestions to avoid this initial frustration:

  • Run these first examples from the command line shell. e.g. just type python3.1 or python3.2
  • Run idle using -n command line option. Windows and OS X can also be configured to start idle with -n
As we begin to work on the Second edition of this book we will be replacing cTurtle with the turtle that is built-in to Python.  You could probably do this in your own course immediately as many of the cTurtle enhancements have been added to the turtle module.  There are some subtle differences that were introduced in order to conform to Python's naming conventions.

A Note about the cImage Module

The cImage module is written to work with or without PIL.  The good news is that PIL should be coming to Python 3.2 very soon.  Numpy has been ported to the Python 3.x line and this will enable many other packages to follow.  In the meantime remember that if you do use cImage without PIL then you will need to use .gif images instead of .jpg.


A Note about Python 3.x

As of today, (October 2010) the current stable release of Python in the 3.x line is Python 3.1.2.  Python 3.2 is coming very soon.  At this time the second alpha release has been made.  Beta is coming soon.  I have been using 3.2 in development work without any ill effects.  The second edition will feature Python 3.2 prompts, and libraries.  Python 3.2 is primarily a stability release, and a release that cleans up problems in the standard library.  There are NO NEW language features in Python3.2.

Second Edition

We have been so pleased to receive such positive feedback about this book.  We are already working on a second edition.  If you have suggestions, please feel free to send them via email to info@pythonworks.org


ċ
David Leland Ranum,
Sep 3, 2013, 10:13 AM
ċ
David Leland Ranum,
Sep 3, 2013, 10:13 AM
ċ
cImage.py
(14k)
Brad Miller,
Oct 10, 2010, 6:10 PM
ċ
cTurtle.py
(103k)
Brad Miller,
Oct 10, 2010, 6:10 PM
Comments