get line number and filename in a source file

Discussion in 'Python' started by Peng Yu, Nov 25, 2009.

  1. Peng Yu

    Peng Yu Guest

    __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++)?
    Peng Yu, Nov 25, 2009
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Hugo
    Replies:
    10
    Views:
    1,290
    Matt Humphrey
    Oct 18, 2004
  2. Replies:
    1
    Views:
    1,431
    Roland de Ruiter
    Jun 15, 2006
  3. Marek Prerovsky
    Replies:
    1
    Views:
    572
    python
    Feb 16, 2005
  4. Peng Yu
    Replies:
    1
    Views:
    428
    Wei Sun
    Nov 22, 2010
  5. Stefano Crocco
    Replies:
    0
    Views:
    131
    Stefano Crocco
    Nov 14, 2008
Loading...

Share This Page