[IPython-user] Ruminations on Leo + IPython

Edward Ream edreamleo@yahoo....
Thu Jan 31 08:18:26 CST 2008

> Could you point me  to some documentation  explaining  what would be
the  ideal workflow to develop a serious (Multi-package, multi-modules)
Python project within Leo? I am seriously interested. May be even how
to import a project into Leo?

I'm not sure I've ever been asked this question
exactly.  It's a good one.

My suggestion is to look at leoPy.leo (depending on
your distribution it may be called leoPyRef.leo.)
This file contains all of Leo's core sources.  So the
"workflow" is simply to create @thin trees representing your files.

For a discussion of a way to develop Leo itself
without having to continually reload leoPy.leo during
testing, see

>  May be even how to import a project into Leo?

For largish projects I typically use a Leo script
to do the imports.  For one example, see scripts.leo,
in the node:

Scripts-->@file leoScripts.txt-->Important-->Recursive import script

There is also a script in test.leo that creates @auto
nodes from a project.  See the node:

Startup-->Commands, scripts-->create-at-auto-nodes

@auto nodes are new this year, but they seem to be
becoming the method of choice for studying other people's code.  In any case, the import commands and the @auto logic both use the so-called "perfect import" logic that warns if writing the imported code
will not be identical (in various senses) to the
original code.

> IMO, literate programming shouldn't get in your way while
programming, thats why currently, all the "literature" in my programs
are the docstrings ;-)

I agree completely.  Indeed, I have said many times
that Leo redefines what  literate programming is.  See:


and especially:


In particular, Leo *dramatically decreases* the
need for comments, especially comments that are intended to provide the 'big picture' of complex code
or data.  Outline structure is *way* clearer than

Furthermore, the more I use Leo, the less I use
literate programming features.  Indeed, section references are usually anti-patterns, imo.  I typically use section references only for constructs,
like groups of import statements, or long docstrings,
that can not be encapsulated easily in Python methods.

Edward K. Ream   email:  edreamleo@yahoo.com
Leo: http://webpages.charter.net/edreamleo/front.html

Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ipython.scipy.org/pipermail/ipython-user/attachments/20080131/eafe2e6e/attachment.html 

More information about the IPython-user mailing list