[Python-checkins] CVS: python/dist/src/Lib rexec.py,1.32,1.33
Tim Peters
tim_one@users.sourceforge.net
Thu, 13 Sep 2001 14:01:31 -0700
Update of /cvsroot/python/python/dist/src/Lib
In directory usw-pr-cvs1:/tmp/cvs-serv5024/python/Lib
Modified Files:
rexec.py
Log Message:
Now that file objects are subclassable, you can get at the file constructor
just by doing type(f) where f is any file object. This left a hole in
restricted execution mode that rexec.py can't plug by itself (although it
can plug part of it; the rest is plugged in fileobject.c now).
Index: rexec.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/rexec.py,v
retrieving revision 1.32
retrieving revision 1.33
diff -C2 -d -r1.32 -r1.33
*** rexec.py 2001/08/13 15:58:26 1.32
--- rexec.py 2001/09/13 21:01:29 1.33
***************
*** 133,137 ****
'platform', 'exit', 'maxint')
! nok_builtin_names = ('open', 'reload', '__import__')
def __init__(self, hooks = None, verbose = 0):
--- 133,137 ----
'platform', 'exit', 'maxint')
! nok_builtin_names = ('open', 'file', 'reload', '__import__')
def __init__(self, hooks = None, verbose = 0):
***************
*** 187,191 ****
m.__import__ = self.r_import
m.reload = self.r_reload
! m.open = self.r_open
def make_main(self):
--- 187,191 ----
m.__import__ = self.r_import
m.reload = self.r_reload
! m.open = m.file = self.r_open
def make_main(self):