summaryrefslogtreecommitdiffstats
path: root/Doc/library/subprocess.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/subprocess.rst')
-rw-r--r--Doc/library/subprocess.rst6
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/subprocess.rst b/Doc/library/subprocess.rst
index dfd21a2..5ac32df 100644
--- a/Doc/library/subprocess.rst
+++ b/Doc/library/subprocess.rst
@@ -284,11 +284,11 @@ A more realistic example would look like this::
try:
retcode = call("mycmd" + " myarg", shell=True)
if retcode < 0:
- print >>sys.stderr, "Child was terminated by signal", -retcode
+ print("Child was terminated by signal", -retcode, file=sys.stderr)
else:
- print >>sys.stderr, "Child returned", retcode
+ print("Child returned", retcode, file=sys.stderr)
except OSError as e:
- print >>sys.stderr, "Execution failed:", e
+ print("Execution failed:", e, file=sys.stderr)
Replacing os.spawn\*