[IronPython] sys._getframe(0).f_lineno always returns 1

yngipy hernan yngipy at gmail.com
Wed Jul 7 23:15:01 PDT 2010


Hi all,

I have observed something that may be an issue, see snippet below

import sys

#filename is temp.py
print 'hello world'
print 'hello world'
print 'Line : %s'%sys._getframe(0).f_lineno

Here is my command line:

ipy.exe -X:FullFrames temp.py

The command "sys._getframe(0).f_lineno" always returns 1.

Below my IPY version:
IronPython 2.6.1 (2.6.10920.0) on .NET 4.0.30319.1

Note that CPython 2.6.5 reports "6"

Regards,
Yngipy
IPRobot (http://pyas.svn.sourceforge.net/viewvc/pyas/trunk/src/ipr/)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ironpython.com/pipermail/users-ironpython.com/attachments/20100708/9348d1bf/attachment.htm>


More information about the Users mailing list