Skip to content

Instantly share code, notes, and snippets.

@ikarino
Created December 3, 2014 15:42
Show Gist options
  • Save ikarino/e0112ad63a8aaea120e4 to your computer and use it in GitHub Desktop.
Save ikarino/e0112ad63a8aaea120e4 to your computer and use it in GitHub Desktop.
check version of g++ in Sakura
#!/usr/local/bin/python
import subprocess
print 'Content-type: text/html; charset=utf-8'
print "\r\n\r\n"
print "Checking status<br />"
proc = subprocess.Popen("/usr/bin/g++ -v", shell=True,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
print "=======STDOUT=======<br />"
for i in proc.stdout:
print i + "<br />"
print "=======STDERR=======<br />"
for i in proc.stderr:
print i + "<br />"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment