Python equivalent of #line?

Thomas Guettler guettli at thomas-guettler.de
Sun May 25 15:52:24 EDT 2003


On Sun, May 25, 2003 at 09:37:31AM -0400, François Pinard wrote:
> [Gerrit Holl]
> 
> > Edward C. Jones schreef op zondag 25 mei om 14:27:34 +0000:
> > > C has a preprocessor command
> > >   #line n "filename"
> > > Can I do this in Python?
> 
> > Why do you want that?
> 
> For the case you drive generation of Python code from lengthy data files ...

I think automatically creating python code is a bad idea. I once had
to deal with an old project which stored data in the syntax of a
programming language. It is hell. Data should be in a format suitable
for data.

I hope this warning does not apply to your project. 

 thomas

-- 
Thomas Guettler <guettli at thomas-guettler.de>
http://www.thomas-guettler.de






More information about the Python-list mailing list