We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c9c661c commit 2c39cc7Copy full SHA for 2c39cc7
examples/external/Popen/githash.py
@@ -1,10 +1,13 @@
1
import subprocess
2
+import string
3
-prog = ["git", "rev-parse", "--abbrev-ref", "HEAD"]
4
+# issue the command 'git rev-parse HEAD'
5
+prog = ["git", "rev-parse", "HEAD"]
6
p0 = subprocess.Popen(prog, stdout=subprocess.PIPE,
- stderr=subprocess.STDOUT)
7
+ stderr=subprocess.PIPE)
8
stdout0, stderr0 = p0.communicate()
9
10
print "stdout: {}".format(stdout0)
11
print "stderr: {}".format(stderr0)
12
13
+
0 commit comments