|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
import easygui as g
msg = "请输写以下联系方式"
title = "账号中心"
fieldName = ["*用户名" , "*真实姓名", "固有电话" , "*手机号码", "QQ" , "*E-mail"]
#x = []
x = g.multenterbox(msg , title , fieldName)
while True:
if x == None:
break
y = "" #相当于字符串
for i in range(len(fieldName)):
option = fieldName[i].strip()
if x[i].strip() == "" and option[0] == "*":
y += ('(%s)为必填项。\n\n ' % fieldName[i]) #字符串
if y =="":
break
x = g.multenterbox(msg = y , title = title , fields = fieldName, values = x)#field 是代表提示词 value是代表输入的返回值
print("用户资料如下: %s" % str(x))
import easygui as g
def main(x , y):
while True:
if x == None:
break
#y = "" #相当于字符串
for i in range(len(fieldName)):
option = fieldName[i].strip()
if x[i].strip() == "" and option[0] == "*":
y += ('(%s)为必填项。\n\n ' % fieldName[i]) #字符串
return main
if y == "":
break
msg = "请输写以下联系方式"
title = "账号中心"
fieldName = ["*用户名" , "*真实姓名", "固有电话" , "*手机号码", "QQ" , "*E-mail"]
#x = []
x = g.multenterbox(msg , title , fieldName)
y = "" #相当于字符串
while True:
x = g.multenterbox(msg = main(x , y) , title = title , fields = fieldName, values = x)#field 是代表提示词 value是代表输入的返回值
print("用户资料如下: %s" % str(x))
|
|