[issue6712] sys._getframe is not available on all Python implementations

Tobias Ivarsson report at bugs.python.org
Mon Aug 17 00:01:30 CEST 2009


Tobias Ivarsson <thobes at gmail.com> added the comment:

While it is true that not all Python implementations support
sys._getframe() in some or all execution modes, Jython does support it,
even IronPython supports it with the proper startup parameters these days.

More importantly sys._getframe() [or something equivalent] *is*
available as a public API in the inspect module of Python, as
inspect.currentframe(). I don't know why the inspect module is not
brought up in the discussions about sys._getframe(), but it is a public
API. Would this mean that introspecting callframes is something all
interpreters are expected to support? Brett: what is your opinion?
Perhaps I should move this discussion to the mailing list?

----------
nosy: +thobe

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue6712>
_______________________________________


More information about the Python-bugs-list mailing list