Re: execfile python3k

2008-05-12 Thread Christian Heimes
Odys schrieb: > Hi there, > > Since execfile() is removed in Python 3.0 > I have question about using exec. > > I know about > exec(open('filename').read()) > but from documentation the 1st arg of exec can be 'file object'. > However >exec(open('filename')) > does not work. > Does anybody h

execfile python3k

2008-05-12 Thread Odys
Hi there, Since execfile() is removed in Python 3.0 I have question about using exec. I know about exec(open('filename').read()) but from documentation the 1st arg of exec can be 'file object'. However exec(open('filename')) does not work. Does anybody have idea how to construct 'file object