python - 如何恢复用户的地址服务器,将其放入变量中并在命令行中执行

标签 python linux

scriptInfo.py

import os, sys, platform, webbrowser



def main()

  template = open('scriptHmtl.phtml').read()

scriptHtml.phtml

<html>
<head>
</head>
<body>
<h2><center> welcome </center></h2>
<br/><br/><br/>

...
variables
..

<form name="sendData" method="get" action="http://localhost:8000/cgi/scriptGet.py">
    Name: <input type="text" name="n"><br/><br/>
    First Name: <input type="text" name="fn"/><br/><br/>
    Mail: <input type="text" name="ma"/><br/><br/>
    Address: <input type="text" name="add"/> <br/><br/>
    <input type="submit" value="OK"/>
</form>

必须有一个包含恢复服务器地址的代码的变量,而不是 action="http://localhost:8000/cgi/scriptGet.py",但我不知道该怎么做。

最佳答案

使用 HTML 表单,您可以忽略服务器并直接进入脚本。

例如像

<form name="sendData" method="get" action="cgi/scriptGet.py">

关于python - 如何恢复用户的地址服务器,将其放入变量中并在命令行中执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24629113/

相关文章:

c - 文件描述符消失/无效

python - Pandas Dataframe-从20年的历史数据中删除一天中的某些时间

linux - 在 tmux 中绑定(bind) Ctrl+Tab 和 Ctrl+Shift+Tab

python - maildir 消息的文件名 - maildir.Maildir

python - python 的正则表达式更改一组字符

linux - 如何将 GtkTerm 输出自动保存到文件

c - 写入该文件时来自单个文件的多个缓冲输入流?

python - SciPy 安装和测试后的奇怪文件

python - 清晰显示高密度区域和低密度区域的热图(python)

python - Google Big Query 中同步查询的作业配置