August 6th, 2007, 10:23 PM
Get current file name and path
Hi. In PHP it is commong to do something like this:
dirname() returns the full path to the directory that the current file is in; __FILE__ is the name of the file that this line is in.
Something else that comes in handy in PHP too, is the __LINE__ constant, which gives you the line number that __LINE__ is on.
Is there an equivalent in Python? Thanks.
August 6th, 2007, 11:01 PM
I got it.