#line directive

marshall marshall at spamhole.com
Thu Mar 13 03:38:23 EST 2003


zunlatex at hotmail.com (zunbeltz) wrote in message news:<7d728336.0303112358.4b95dd1b at posting.google.com>...
> Peter Hansen <peter at engcorp.com> wrote in message news:<3E6DEE2D.B69B7A68 at engcorp.com>...
> > zunbeltz wrote:
> > > 
> > > Has Python a #line directive like C preprocesor?
> > 
> > The functionality you are looking for is probably included,
> > but in a different way.  Can you describe what you want to
> > do with that information?  Check whether a combination of
> > sys._getframe() and the "inspect" or "traceback" modules 
> > might not do the job.
> > 
> > -Peter
> I'm writing a programe in a literate programming way using nuweb. 
> Nuweb permit to mix code and comments and to arrange the code in
> diferent way.  I proces the nuweb file and get a .py file.  When i run
> this .py file sometimes i get error mensages ( a lot of times :-) This
> mensages referes  to lines in the .py file and no in the nuweb file,
> which is my "source file".  I want to be able to say the python
> interpreter that the line it is reading is not that of the .py and is
> line number XXXX in the nuweb file
> 
> thanks
> 
> Zunbeltz

You will want to look at this:

https://sourceforge.net/projects/leo/

Leo is designed for just this kind of literate programming.

Marshall




More information about the Python-list mailing list