是的,简而言之,我想知道为什么我会在我的钥匙和价值观面前看到au.
我正在渲染表格.表单具有特定标签的复选框和ip地址的一个文本字段.我正在创建一个字典,其中键是标签,在list_key中是硬编码的,字典的值是从表单输入(list_value)中获取的.字典已创建,但前面有一些值的u.这是字典的示例输出:
{u'1': {'broadcast': u'on', 'arp': '', 'webserver': '', 'ipaddr': u'', 'dns': ''}}
Run Code Online (Sandbox Code Playgroud)
谁能请解释我做错了什么.当我在pyscripter中模拟类似的方法时,我没有收到错误.欢迎任何改进代码的建议.谢谢
#!/usr/bin/env python
import webapp2
import itertools
import cgi
form ="""
<form method="post">
FIREWALL
<br><br>
<select name="profiles">
<option value="1">profile 1</option>
<option value="2">profile 2</option>
<option value="3">profile 3</option>
</select>
<br><br>
Check the box to implement the particular policy
<br><br>
<label> Allow Broadcast
<input type="checkbox" name="broadcast">
</label>
<br><br>
<label> Allow ARP
<input type="checkbox" name="arp">
</label><br><br>
<label> Allow Web traffic from external address to internal webserver
<input type="checkbox" name="webserver">
</label><br><br>
<label> …Run Code Online (Sandbox Code Playgroud)