Meta Line information in Python?

Emile van Sebille emile at fenx.com
Thu Jul 4 09:07:55 EDT 2002


Tan Woon Kiong
> Is there a way to specify meta line information in Python?
>
> For instance, in C language, this can be done by writing the statement
>   #line <line-no> "<src file>"
>
> For example, the following line in a file "el2h.py"
>   #line 79 "el2h.nw"
> means that the next statement comes from line 79 of the file
> "el2h.nw".

There is no meta (nor macro) ability built into the language, but if
you'd really rather have this than using import for library content, it
would be straight forward to write one up in python.


--

Emile van Sebille
emile at fenx.com

---------




More information about the Python-list mailing list