[Zope3-dev] Re: [Zope-Checkins] CVS: Zope3/src/persistent/tests - test_persistent.py:1.5 persistent.txt:1.2

Jeremy Hylton jeremy at zope.com
Wed Mar 10 10:18:41 EST 2004


On Wed, 2004-03-10 at 10:11, Chris Withers wrote:
> python persistent.txt won't help me much, and I don't know of an emacs mode for 
> the kind of pseudo source code you have interspersed in that file...
> 
> > In the future, I'd like to have a lot more README.txt files explaining
> > packages and having executable examples.
> 
> How would a user execute these examples?

Is this where the disconnect starts?  (It seems like you're going on and
on about how to code isn't code, which just doesn't make any sense to
me.)

In emacs, execute the command py-shell.  You'll get a Python interpreter
prompt.  You can cut-and-paste code from the interpreter shell into a
doctest.  

There are lots of ways to execute all the code in the doctest file.  We
obviously run the tests, so this isn't exactly. what you're complaining
about.  If you want to run an individual example, copy the code (or
re-type it) into the same interpreter shell.  That's the whole point of
doctest -- what you see is what you get.

Jeremy




More information about the Zope3-dev mailing list