Message4379

Author fabioz
Recipients fabioz
Date 2009-03-29.20:53:45
SpamBayes Score 1.5023649e-11
Marked as misclassified No
Message-id <1238360026.36.0.33776033016.issue1294@psf.upfronthosting.co.za>
In-reply-to
Content
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()
History
Date User Action Args
2009-03-29 20:53:46fabiozsetrecipients: + fabioz
2009-03-29 20:53:46fabiozsetmessageid: <1238360026.36.0.33776033016.issue1294@psf.upfronthosting.co.za>
2009-03-29 20:53:46fabiozlinkissue1294 messages
2009-03-29 20:53:45fabiozcreate