Sharedwww / cgi-bin / test.pyOpen in CoCalc
Author: William A. Stein
1
#!/usr/bin/python
2
print "Content-type: text/html\n\n"
3
print "Hello, World."
4
print "<pre>"
5
6
import os
7
print os.popen("ls").read()
8
#print os.popen("/usr/local/bin/gp").read()
9
#print os.popen('echo "2+2;" |/usr/local/bin/magma').read()
10
os.system('echo "hi" >/tmp/a')
11
12
print "</pre>"
13