Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Python > get line number and filename in a source file

Reply
Thread Tools

get line number and filename in a source file

 
 
Peng Yu
Guest
Posts: n/a
 
      11-25-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++)?
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
print line number and source filename Peng Yu Python 1 11-22-2010 04:23 PM
File.fnmatch? doesn't distinguish between .filename and ./filename ? Stefano Crocco Ruby 0 11-14-2008 10:48 AM
how to get 8.3 format filename from long filename jacobyv@sis.unibe.ch Java 1 06-15-2006 10:39 AM
How can I get the source file name and current line number insideexecuted C-function Marek Prerovsky Python 1 02-16-2005 07:52 PM
Read a file line by line with a maximum number of characters per line Hugo Java 10 10-18-2004 11:42 AM



Advertisments