|
From: Fabio Z. <re...@bu...> - 2009-03-29 20:53:53
|
New submission from Fabio Zadrozny <fa...@gm...>:
The version is actually 2.5b3 (couldn't find it there).
The code below shows the error. exec() fails with:
TypeError: exec: argument 1 must be string, code or file object
But note that the if the namespace is not passed (globals and locals) it
works.
I've marked it as critical because this seems like a real blocker
(cannot make a debugger work properly without it, as any expressions
won't work)
import sys
import unittest
class TestCase(unittest.TestCase):
def testExec(self):
frame = sys._getframe()
exec('print self.__class__', {}, frame.f_locals)
if __name__ == '__main__':
unittest.main()
----------
components: Core
messages: 4379
nosy: fabioz
severity: critical
status: open
title: exec() does not work when namespace is passed
type: behaviour
versions: 2.5.1
_______________________________________
Jython tracker <re...@bu...>
<http://bugs.jython.org/issue1294>
_______________________________________
|