Literate programs in Python

Discussion in 'Python' started by Paul Miller, May 13, 2008.

  1. Paul Miller

    Paul Miller Guest

    Does anyone know of any (preferably largish) examples of literate
    programs written using Python? Alternatively, does anyone know of any
    literate programming tools which support Python well? (I am aware of
    Leo and I've been to literateprogramming.com, but any additional
    pointers would be much appreciated!)

    Thanks,

    Paul
     
    Paul Miller, May 13, 2008
    #1
    1. Advertising

  2. On May 13, 10:28 am, Paul Miller <> wrote:
    > Does anyone know of any (preferably largish) examples of literate
    > programs written using Python?  Alternatively, does anyone know of any
    > literate programming tools which support Python well?  (I am aware of
    > Leo and I've been to literateprogramming.com, but any additional
    > pointers would be much appreciated!)
    >
    > Thanks,
    >
    > Paul


    Check out Zope, bittorrent, or Editra. You should just go to
    SourceForge and do a search for projects done in Python.

    Mike
     
    Mike Driscoll, May 13, 2008
    #2
    1. Advertising

  3. Paul Miller

    Carl Banks Guest

    On May 13, 1:44 pm, Mike Driscoll <> wrote:
    > On May 13, 10:28 am, Paul Miller <> wrote:
    >
    > > Does anyone know of any (preferably largish) examples of literate
    > > programs written using Python? Alternatively, does anyone know of any
    > > literate programming tools which support Python well? (I am aware of
    > > Leo and I've been to literateprogramming.com, but any additional
    > > pointers would be much appreciated!)

    >
    > Check out Zope, bittorrent, or Editra. You should just go to
    > SourceForge and do a search for projects done in Python.



    Those aren't examples of literate programming AFAIK. (Check Wikipedia
    for "literate programming" if you're still confused.)

    It occurs to me that one could get pretty close to literate
    programming with Pure Python (if they stick to regular function calls
    and not expect code weaving, which would need a preprocessor). A
    fairly simple script could parse docstrings and Python source files
    to produce a document from the source. In fact, there are tools that
    can do that sort of thing already, but I doubt they output documents
    according to literate programming expectations. Don't know of any
    tools specifically for literate programming.


    Carl Banks
     
    Carl Banks, May 13, 2008
    #3
  4. On May 13, 1:47 pm, Carl Banks <> wrote:
    > On May 13, 1:44 pm, Mike Driscoll <> wrote:
    >
    > > On May 13, 10:28 am, Paul Miller <> wrote:

    >
    > > > Does anyone know of any (preferably largish) examples of literate
    > > > programs written using Python?  Alternatively, does anyone know of any
    > > > literate programming tools which support Python well?  (I am aware of
    > > > Leo and I've been to literateprogramming.com, but any additional
    > > > pointers would be much appreciated!)

    >
    > > Check out Zope, bittorrent, or Editra. You should just go to
    > > SourceForge and do a search for projects done in Python.

    >
    > Those aren't examples of literate programming AFAIK.  (Check Wikipedia
    > for "literate programming" if you're still confused.)
    >
    > It occurs to me that one could get pretty close to literate
    > programming with Pure Python (if they stick to regular function calls
    > and not expect code weaving, which would need a preprocessor).  A
    > fairly simple script could  parse docstrings and Python source files
    > to produce a document from the source.  In fact, there are tools that
    > can do that sort of thing already, but I doubt they output documents
    > according to literate programming expectations.  Don't know of any
    > tools specifically for literate programming.
    >
    > Carl Banks


    Sorry...I took the OP's meaning literally...

    Mike
     
    Mike Driscoll, May 13, 2008
    #4
  5. Paul Miller

    Max M Guest

    Mike Driscoll skrev:
    > On May 13, 10:28 am, Paul Miller <> wrote:
    >> Does anyone know of any (preferably largish) examples of literate
    >> programs written using Python? Alternatively, does anyone know of any
    >> literate programming tools which support Python well? (I am aware of
    >> Leo and I've been to literateprogramming.com, but any additional
    >> pointers would be much appreciated!)



    I think that most people in Python use doctest. Personally I find this
    form of literal programming to be very efficient.

    Like the example here:

    http://codespeak.net/icalendar/example.html


    --

    hilsen/regards Max M, Denmark

    http://www.mxm.dk/
    IT's Mad Science
     
    Max M, May 13, 2008
    #5
  6. On May 13, 5:28 pm, Paul Miller <> wrote:
    > Does anyone know of any (preferably largish) examples of literate
    > programs written using Python? Alternatively, does anyone know of any
    > literate programming tools which support Python well? (I am aware of
    > Leo and I've been to literateprogramming.com, but any additional
    > pointers would be much appreciated!)
    >
    > Thanks,
    >
    > Paul


    You may be interested in this:
    http://stacktrace.it/articoli/2008/01/geek-publishing/

    (you may want to use the Google Translator, unless you know Italian).
     
    Michele Simionato, May 14, 2008
    #6
  7. On Tue, 13 May 2008 08:28:00 -0700, Paul Miller wrote:

    > Alternatively, does anyone know of any literate programming tools which
    > support Python well?


    There's PyLit_. It uses reStructuredText_ and can translate between a
    reStructuredText with code blocks and source code with the text as
    comments in both directions.

    ... _PyLit: http://pylit.berlios.de/
    ... _reStructuredText: http://docutils.sourceforge.net/

    Ciao,
    Marc 'BlackJack' Rintsch
     
    Marc 'BlackJack' Rintsch, May 14, 2008
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike Maxwell

    XMLMind and Literate Programming

    Mike Maxwell, Nov 2, 2004, in forum: XML
    Replies:
    2
    Views:
    368
    Mike Maxwell
    Nov 3, 2004
  2. How to literate a const char*

    , Jul 14, 2007, in forum: C Programming
    Replies:
    2
    Views:
    336
    Christopher Benson-Manica
    Jul 15, 2007
  3. Hans Georg Schaathun

    Literate Programming

    Hans Georg Schaathun, Apr 7, 2011, in forum: Python
    Replies:
    10
    Views:
    492
    Tim Arnold
    Apr 11, 2011
  4. Massimiliano Mirra - bard

    Literate testing?

    Massimiliano Mirra - bard, Aug 27, 2004, in forum: Ruby
    Replies:
    6
    Views:
    128
    Mauricio Fernández
    Aug 30, 2004
  5. Ruby Quiz

    [QUIZ] Literate Ruby (#102)

    Ruby Quiz, Nov 17, 2006, in forum: Ruby
    Replies:
    10
    Views:
    207
    James Edward Gray II
    Nov 22, 2006
Loading...

Share This Page