"Hello.py"의 두 판 사이의 차이

DH 교육용 위키
이동: 둘러보기, 검색
(새 문서: <pre> #!/usr/bin/env python import cgi html = """ <html> <head> <title>Hello Word - First CGI Program</title> </head> <body> <h2>Hello Word! This is my first py CGI program</h2> </b...)
 
 
(같은 사용자에 의한 2개의 중간 편집이 숨겨짐)
1번째 줄: 1번째 줄:
 
<pre>
 
<pre>
#!/usr/bin/env python
+
#!/usr/bin/python
 +
#-*- coding: utf-8 -*-
  
 
import cgi
 
import cgi
 +
import cgitb
  
 
html = """
 
html = """
17번째 줄: 19번째 줄:
 
print html
 
print html
 
</pre>
 
</pre>
 +
 +
 +
==Result==
 +
<html>
 +
<iframe width=96% height=700px frameborder=0 src=http://dh.aks.ac.kr/~tutor/cgi-bin/Hello.py></iframe>
 +
</html>

2020년 5월 21일 (목) 17:48 기준 최신판

#!/usr/bin/python
#-*- coding: utf-8 -*-

import cgi
import cgitb

html = """
<html>
<head>
<title>Hello Word - First CGI Program</title>
</head>
<body>
<h2>Hello Word! This is my first py CGI program</h2>
</body>
</html>"""

print "Content-type:text/html\n\n"
print html


Result