Preparing teaching materials

R. David Murray rdmurray at bitdance.com
Sat Mar 21 18:10:25 EDT 2009


"Rhodri James" <rhodri at wildebst.demon.co.uk> wrote:
> On Fri, 20 Mar 2009 11:58:18 -0000, <grkuntzmd at gmail.com> wrote:
> 
> > I am considering teaching a beginning programming course using Python.
> > I would like to prepare my class handouts in such a way that I can
> > import the Python code from real ".py" files directly into the
> > documents. This way I can run real unit tests on the code to confirm
> > that they work as expected.
> >
> > I am considering using LaTeX to write the handouts and then converting
> > them to PDF files. I will probably use a Makefile to convert the LaTeX
> > with embedded Python code into the PDF files using pdflatex.
> >
> > I will probably organize my directory structure into sub-directories
> > py-src, py-test, doc-src, and doc-dist.
> >
> > I will be starting out using Windows Vista/cygwin and hopefully switch
> > to a Macbook this summer.
> >
> > Any thoughts?
> 
> Decide right now whether you're using Python 2.x or Python 3.x.  The
> switch from print-as-statement to print-as-function is one of the
> things that will throw beginners very badly indeed if your handouts
> and computers don't make the same assumptions!

Print as function can be used in 2.6+ via 'from __future__ import print_function'.
So it is probably best to teach print-as-function regardless.

--
R. David Murray           http://www.bitdance.com




More information about the Python-list mailing list