summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorCarn? Draug <carandraug+dev@gmail.com>2015-09-26 20:42:53 +0100
committerCarn? Draug <carandraug+dev@gmail.com>2015-09-26 20:42:53 +0100
commit26f7b4f32aaa3e0adb17d8c5a7f25ba5396d61a1 (patch)
treee4dcadbc3d2b43322ef219a74de1d85c759dc65d /doc
parentb74f22668404ab7cc259240d2a2ff5c14cbb6744 (diff)
downloadscons-26f7b4f32aaa3e0adb17d8c5a7f25ba5396d61a1.tar.gz
doc: do not recommend os.popen which is deprecated in python
Diffstat (limited to 'doc')
-rw-r--r--doc/user/tasks.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/doc/user/tasks.xml b/doc/user/tasks.xml
index 0bdf6786..8026a536 100644
--- a/doc/user/tasks.xml
+++ b/doc/user/tasks.xml
@@ -96,8 +96,8 @@ filenames = [x for x in filenames if os.path.splitext(x)[1] in extensions]
<example>
<title>The "backtick function": run a shell command and capture the
output</title>
-<programlisting>import os
-output = os.popen(command).read()
+<programlisting>import subprocess
+output = subprocess.check_output(command)
</programlisting>
</example>