[Python-checkins] python/dist/src/Lib pdb.py, 1.70,
1.71 subprocess.py, 1.2, 1.3
tim_one at users.sourceforge.net
tim_one at users.sourceforge.net
Tue Oct 12 23:51:35 CEST 2004
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15813/Lib
Modified Files:
pdb.py subprocess.py
Log Message:
Whitespace normalization.
Index: pdb.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/pdb.py,v
retrieving revision 1.70
retrieving revision 1.71
diff -u -d -r1.70 -r1.71
--- pdb.py 12 Oct 2004 18:12:09 -0000 1.70
+++ pdb.py 12 Oct 2004 21:51:32 -0000 1.71
@@ -946,7 +946,7 @@
into an absolute file name.
"""
if os.path.isabs(filename) and os.path.exists(filename):
- return filename
+ return filename
f = os.path.join(sys.path[0], filename)
if os.path.exists(f) and self.canonic(f) == self.mainpyfile:
return f
@@ -967,8 +967,8 @@
# Start with fresh empty copy of globals and locals and tell the script
# that it's being run as __main__ to avoid scripts being able to access
# the pdb.py namespace.
- globals_ = {"__name__" : "__main__"}
- locals_ = globals_
+ globals_ = {"__name__" : "__main__"}
+ locals_ = globals_
# When bdb sets tracing, a number of call and line events happens
# BEFORE debugger even reaches user's code (and the exact sequence of
@@ -1057,7 +1057,7 @@
pdb._runscript(mainpyfile)
if pdb._user_requested_quit:
break
- print "The program finished and will be restarted"
+ print "The program finished and will be restarted"
except SystemExit:
# In most cases SystemExit does not warrant a post-mortem session.
print "The program exited via sys.exit(). Exit status: ",
@@ -1076,4 +1076,3 @@
# When invoked as main program, invoke the debugger on a script
if __name__=='__main__':
main()
-
Index: subprocess.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/subprocess.py,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -d -r1.2 -r1.3
--- subprocess.py 12 Oct 2004 16:38:42 -0000 1.2
+++ subprocess.py 12 Oct 2004 21:51:32 -0000 1.3
@@ -1,6 +1,6 @@
# subprocess - Subprocesses with accessible I/O streams
#
-# For more information about this module, see PEP 324.
+# For more information about this module, see PEP 324.
#
# Copyright (c) 2003-2004 by Peter Astrand <astrand at lysator.liu.se>
#
@@ -174,7 +174,7 @@
terminate. The optional stdin argument should be a string to be
sent to the child process, or None, if no data should be sent to
the child.
-
+
communicate() returns a tuple (stdout, stderr).
Note: The data read is buffered in memory, so do not use this
@@ -262,7 +262,7 @@
Replacing os.spawn*
-------------------
-P_NOWAIT example:
+P_NOWAIT example:
pid = os.spawnlp(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg")
==>
@@ -276,21 +276,21 @@
retcode = call(["/bin/mycmd", "myarg"])
-Vector example:
+Vector example:
os.spawnvp(os.P_NOWAIT, path, args)
==>
Popen([path] + args[1:])
-Environment example:
+Environment example:
os.spawnlpe(os.P_NOWAIT, "/bin/mycmd", "mycmd", "myarg", env)
==>
Popen(["/bin/mycmd", "myarg"], env={"PATH": "/usr/bin"})
-Replacing os.popen*
+Replacing os.popen*
-------------------
pipe = os.popen(cmd, mode='r', bufsize)
==>
@@ -352,7 +352,7 @@
* the capturestderr argument is replaced with the stderr argument.
* stdin=PIPE and stdout=PIPE must be specified.
* popen2 closes all filedescriptors by default, but you have to specify
- close_fds=True with subprocess.Popen.
+ close_fds=True with subprocess.Popen.
"""
@@ -468,10 +468,10 @@
for c in arg:
if c == '\\':
- # Don't know if we need to double yet.
+ # Don't know if we need to double yet.
bs_buf.append(c)
elif c == '"':
- # Double backspaces.
+ # Double backspaces.
result.append('\\' * len(bs_buf)*2)
bs_buf = []
result.append('\\"')
@@ -482,7 +482,7 @@
bs_buf = []
result.append(c)
- # Add remaining backspaces, if any.
+ # Add remaining backspaces, if any.
if bs_buf:
result.extend(bs_buf)
@@ -513,7 +513,7 @@
if creationflags != 0:
raise ValueError("creationflags is only supported on Windows platforms")
- self.stdin = None
+ self.stdin = None
self.stdout = None
self.stderr = None
self.pid = None
@@ -534,7 +534,7 @@
# are file descriptors on both platforms. The parent objects
# are None when not using PIPEs. The child objects are None
# when not redirecting.
-
+
(p2cread, p2cwrite,
c2pread, c2pwrite,
errread, errwrite) = self._get_handles(stdin, stdout, stderr)
@@ -558,7 +558,7 @@
self.stderr = os.fdopen(errread, 'rU', bufsize)
else:
self.stderr = os.fdopen(errread, 'rb', bufsize)
-
+
_active.append(self)
@@ -578,7 +578,7 @@
"""
if stdin == None and stdout == None and stderr == None:
return (None, None, None, None, None, None)
-
+
p2cread, p2cwrite = None, None
c2pread, c2pwrite = None, None
errread, errwrite = None, None
@@ -651,7 +651,7 @@
"for Popen to work with your shell or platform.")
return w9xpopen
-
+
def _execute_child(self, args, executable, preexec_fn, close_fds,
cwd, env, universal_newlines,
startupinfo, creationflags, shell,
@@ -685,7 +685,7 @@
if startupinfo == None:
startupinfo = STARTUPINFO()
if not None in (p2cread, c2pwrite, errwrite):
- startupinfo.dwFlags |= STARTF_USESTDHANDLES
+ startupinfo.dwFlags |= STARTF_USESTDHANDLES
startupinfo.hStdInput = p2cread
startupinfo.hStdOutput = c2pwrite
startupinfo.hStdError = errwrite
@@ -724,7 +724,7 @@
if errwrite != None:
errwrite.Close()
-
+
def poll(self):
"""Check if child process has terminated. Returns returncode
attribute."""
@@ -830,7 +830,7 @@
c2pwrite = stdout
else:
# Assuming file-like object
- c2pwrite = stdout.fileno()
+ c2pwrite = stdout.fileno()
if stderr == None:
pass
@@ -867,8 +867,8 @@
os.close(i)
except:
pass
-
-
+
+
def _execute_child(self, args, executable, preexec_fn, close_fds,
cwd, env, universal_newlines,
startupinfo, creationflags, shell,
@@ -976,7 +976,7 @@
_active.remove(self)
-
+
def poll(self):
"""Check if child process has terminated. Returns returncode
attribute."""
@@ -1022,7 +1022,7 @@
self.stdin.close()
if self.stdout:
read_set.append(self.stdout)
- stdout = []
+ stdout = []
if self.stderr:
read_set.append(self.stderr)
stderr = []
@@ -1137,5 +1137,3 @@
_demo_windows()
else:
_demo_posix()
-
-
More information about the Python-checkins
mailing list