[Edu-sig] Re: Best approach to teaching OOP and graphics
david at handysoftware.com
Sat Mar 26 23:00:00 CET 2005
On Sat, Mar 26, 2005 at 04:51:26PM -0500, David Handy wrote:
> So I created a module called demotest that does the same thing as doctest,
> except that it prints each command and response, and it waits for me to
> press Enter before going on to the next line. I just put:
> if __name__ == '__main__':
> import demotest
> at the bottom of my example module and it steps me through my demonstration.
if __name__ == '__main__':
(The function name is demo(), not test(). You'd think I could get my own API
> If this sounds interesting, here is the link to the notes from my
> and here is a direct link to my demotest module:
> Maybe someone else will find it as useful as I did. It requires Python 2.4
> because it uses the "advanced" doctest API: it uses DocTestFinder and
> extends DocTestRunner.
> David H.
More information about the Edu-sig