summaryrefslogtreecommitdiffstats
path: root/Lib/rexec.py
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-01-15 01:18:21 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-01-15 01:18:21 (GMT)
commit0c9886d589ddebf32de0ca3f027a173222ed383a (patch)
tree8d18864b0026ee37a1e917bbb0ff93a1bebda309 /Lib/rexec.py
parent2344fae6d003f5a5dde8016e1d2310e161288708 (diff)
downloadcpython-0c9886d589ddebf32de0ca3f027a173222ed383a.zip
cpython-0c9886d589ddebf32de0ca3f027a173222ed383a.tar.gz
cpython-0c9886d589ddebf32de0ca3f027a173222ed383a.tar.bz2
Whitespace normalization.
Diffstat (limited to 'Lib/rexec.py')
-rw-r--r--Lib/rexec.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/Lib/rexec.py b/Lib/rexec.py
index 8ba3553..57ea599 100644
--- a/Lib/rexec.py
+++ b/Lib/rexec.py
@@ -278,7 +278,7 @@ class RExec(ihooks._Verbose):
def r_unload(self, m):
return self.importer.unload(m)
-
+
# The s_* methods are similar but also swap std{in,out,err}
def make_delegate_files(self):
@@ -309,7 +309,7 @@ class RExec(ihooks._Verbose):
self.restricted_stdin = s.stdin
self.restricted_stdout = s.stdout
self.restricted_stderr = s.stderr
-
+
def save_files(self):
self.save_stdin = sys.stdin
@@ -320,7 +320,7 @@ class RExec(ihooks._Verbose):
sys.stdin = self.save_stdin
sys.stdout = self.save_stdout
sys.stderr = self.save_stderr
-
+
def s_apply(self, func, args=(), kw=None):
self.save_files()
try:
@@ -331,27 +331,27 @@ class RExec(ihooks._Verbose):
r = apply(func, args)
finally:
self.restore_files()
-
+
def s_exec(self, *args):
self.s_apply(self.r_exec, args)
-
+
def s_eval(self, *args):
self.s_apply(self.r_eval, args)
-
+
def s_execfile(self, *args):
self.s_apply(self.r_execfile, args)
-
+
def s_import(self, *args):
self.s_apply(self.r_import, args)
-
+
def s_reload(self, *args):
self.s_apply(self.r_reload, args)
-
+
def s_unload(self, *args):
self.s_apply(self.r_unload, args)
-
+
# Restricted open(...)
-
+
def r_open(self, file, mode='r', buf=-1):
if mode not in ('r', 'rb'):
raise IOError, "can't open files for writing in restricted mode"