python 35讲
import easygui as gtitle= "账号中心"
msg = "请输入账号信息"
fields = ["*用户名","*真实姓名","固定电话","*手机号码","QQ","*E-mail"]
fieldsvalue = []
fieldsvalue = g.multenterbox(msg,title,fields)
while 1:
if fieldsvalue == None:
break
errmsg = ""
for i in range(len(fields)):
option = fields.strip()
if fieldsvalue.strip() == "" and option =="*":
errmsg += ("【%s】为必填项\n\n" % fields)
if errmsg == "":
break
fieldsvalue = g.multenterbox(errmsg,title,fields,fieldsvalue)
print("用户的资料如下下:%s" % str(fieldsvalue))
fieldsvalue = g.multenterbox(errmsg,title,fields,fieldsvalue)括号里的fieldsvalue的意义是啥,如何理解
fieldsvalue是个列表,存放每个输入框的值
页:
[1]