get line number and filename in a source file

P

Peng Yu

__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++)?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top