On Tue, May 5, 2009 at 7:41 AM, Kent Tenney <kten...@gmail.com> wrote:
> On Mon, May 4, 2009 at 5:40 PM, Stephan Richter
> <srich...@cosmos.phy.tufts.edu> wrote:
>> On Monday 04 May 2009, Kent Tenney wrote:
>>> So the magic in *.txt is ad-hoc for each package?
>> It is not magic.
> I've considered the '>>>' prompt an interpreter prompt, so
>>>> write('file', """content""")
> always looked a bit magical to me.

If you're interested in alternate syntax for doctests you might like to
play with Manuel (http://pypi.python.org/pypi/manuel).  It's still in
alpha, but lets you design your own test syntax.  For example, it would
be easy to have the reST below create a file named "foo.txt" with the
given contents:

.. file: foo.txt

    This is my file.
    It is very nice.
Benji York
Senior Software Engineer
Zope Corporation
Zope3-users mailing list

Reply via email to