导航:首页 > 编程语言 > python如何写helloworld

python如何写helloworld

发布时间:2023-07-22 11:02:34

1. python 如何写脚本

以Python2.7操作为例:

1、首先需要打开电脑桌面,按开始的快捷键,点击Python2.7如图所示的选项进入。

2. 如何用python写一段浪漫的代码

简单的,可以使用python 的CGI模块,需要你的服务器开启CGI支持。
网页内容如下:
1
2
3
4
5
6
7
8
9
10
11
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>python cgi</title>
</head><body>
<p style="font-size:24pt;color:red">输入登录密码:</p>
<form name="zhaji" action="login.py" method="post">
<p>密码:<input type="password" name="ma" size="9"></p>
<input type="button" name="shuru" value="登录" onclick="zhaji.submit()">
</form>
</body></html>

login.py文件内容如下:
1
2
3
4
5
6
7
8
9
#!/usr/bin/python
#coding:utf-8
import cgi
form = cgi.FieldStorage()
ma = ""
if 'ma' in form:
ma = form["ma"].value
print '''Content-Type: text/html\n\n'''
print '''<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <title>python cgi</title></head><body><p>你输入的密码是:%s</p> </body></html>''' % ma

阅读全文

与python如何写helloworld相关的资料

热点内容
微信应用锁加密 浏览:449
数字英雄对程序员的影响 浏览:761
程序员培训学校排名 浏览:586
oppo手机如何解开微信的加密 浏览:37
学校论文答辩源码 浏览:66
rp在单片机中 浏览:177
linux软件运行命令 浏览:354
stcid加密程序 浏览:139
把解压包子放到水里 浏览:286
phpmongodb连接池 浏览:945
日本解压捏泡泡纸 浏览:121
环保参比算法 浏览:413
解压中的删掉是什么意思 浏览:766
王牌竞速什么时候能停止维修服务器 浏览:488
pdf阅读器官方 浏览:88
程序员那么爱心 浏览:305
字符a经过md5加密 浏览:420
绿色的小蝴蝶是个什么app 浏览:17
python编程输入数字输出年月日英文 浏览:631
程序员枪手 浏览:748