Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > Literate programs in Python

Reply
Thread Tools

Literate programs in Python

 
 
Paul Miller
Guest
Posts: n/a
 
      05-13-2008
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
 
Reply With Quote
 
 
 
 
Mike Driscoll
Guest
Posts: n/a
 
      05-13-2008
On May 13, 10:28*am, Paul Miller <(E-Mail Removed)> 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
 
Reply With Quote
 
 
 
 
Carl Banks
Guest
Posts: n/a
 
      05-13-2008
On May 13, 1:44 pm, Mike Driscoll <(E-Mail Removed)> wrote:
> On May 13, 10:28 am, Paul Miller <(E-Mail Removed)> 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
 
Reply With Quote
 
Mike Driscoll
Guest
Posts: n/a
 
      05-13-2008
On May 13, 1:47*pm, Carl Banks <(E-Mail Removed)> wrote:
> On May 13, 1:44 pm, Mike Driscoll <(E-Mail Removed)> wrote:
>
> > On May 13, 10:28 am, Paul Miller <(E-Mail Removed)> 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
 
Reply With Quote
 
Max M
Guest
Posts: n/a
 
      05-13-2008
Mike Driscoll skrev:
> On May 13, 10:28 am, Paul Miller <(E-Mail Removed)> 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

 
Reply With Quote
 
Michele Simionato
Guest
Posts: n/a
 
      05-14-2008
On May 13, 5:28 pm, Paul Miller <(E-Mail Removed)> 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).
 
Reply With Quote
 
Marc 'BlackJack' Rintsch
Guest
Posts: n/a
 
      05-14-2008
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Literate Programming Hans Georg Schaathun Python 10 04-11-2011 04:39 PM
How to literate a const char* silverburgh.meryl@gmail.com C Programming 2 07-15-2007 12:29 AM
[QUIZ] Literate Ruby (#102) Ruby Quiz Ruby 10 11-22-2006 05:36 PM
XMLMind and Literate Programming Mike Maxwell XML 2 11-03-2004 02:13 PM
Literate testing? Massimiliano Mirra - bard Ruby 6 08-30-2004 09:02 PM



Advertisments