Re: exec globals and locals

2009-09-02 Thread Quentin Lampin
2009/9/2 Chris Rebert > On Wed, Sep 2, 2009 at 1:13 PM, Quentin Lampin > wrote: > > 2009/9/2 Chris Rebert > >> > >> On Wed, Sep 2, 2009 at 4:54 AM, Quentin Lampin > > >> wrote: > >> > Hi, > >> > Being fairly new to Python, I&#

Re: exec globals and locals

2009-09-02 Thread Quentin Lampin
2009/9/2 Chris Rebert > On Wed, Sep 2, 2009 at 4:54 AM, Quentin Lampin > wrote: > > Hi, > > Being fairly new to Python, I'm trying to figure out the best way to use > the > > exec statement and I must admit that I am a bit lost. > > > > Consider this

exec globals and locals

2009-09-02 Thread Quentin Lampin
Hi, Being fairly new to Python, I'm trying to figure out the best way to use the exec statement and I must admit that I am a bit lost. Consider this case: exec "print 'a'" in {},{} [exp.1] It means that I'm (kindly) asking the interpreter to execute the code string "print 'a'" with empty globa