Paul Giannaros escribió:
On Thursday 22 February 2007 18:53, Juan Fernando Estrada wrote:
hello
how i can get current file line in the same form of __name__ ....
__line__ ???
sys._getframe().f_lineno
The nice thing about getframe is that you can also peek further back and get
more information about the point from which your function was called (locals
that reside there, the name of the function, the line on which you were
called).
_______________________________________________
PyKDE mailing list [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
_______________________________________________
PyKDE mailing list [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
this is the final solution thank's Paul
def __line__():
return sys._getframe(1).f_lineno
_______________________________________________
PyKDE mailing list [email protected]
http://mats.imk.fraunhofer.de/mailman/listinfo/pykde