get line number and filename in a source file

Peng Yu pengyu.ut at gmail.com
Wed Nov 25 00:47:04 EST 2009


__LINE__ __FILE__ in C++ can give the current line number and
filename. Is there a similar thing in python that can give me the
current line number and filename?

Is there a similar thing to __PRETTY_FUNCTION__ (also from C++)?



More information about the Python-list mailing list