import easygui as g
msg='请填写以下联系方式'
title='账号中心'
fieldNames=['*姓名','年龄','QQ']
fieldValues=[]
fieldValues= g.multenterbox (msg,title,fieldNames)
while 1:
if fieldValues == None :
break
errmsg = ''
for i in range(len(fieldNames)):
option = fieldNames[i].strip()
if fieldValues[i].strip() == '' and option[0] == '*':
errmsg += ('[%s]为必须填写. \n\n,' % fieldName[i])
if errmsg == '':
break
fieldValues = g.multenterbox(errmsg,title,fieldNames,fieldValues)
print(str(fieldValues))
错误提醒是这个
Traceback (most recent call last):
File "C:\Users\**\Desktop\Python\multenterbox.py", line 1, in <module>
import easygui as g
File "C:\Users\**\Desktop\Python\easygui.py", line 5, in <module>
g.msgbox("嗨,欢迎进入第一个界面小游戏^_^")
AttributeError: module 'easygui' has no attribute 'msgbox'
我的代码里就没有g.msgbox("嗨,欢迎进入第一个界面小游戏^_^")这个东西啊!!!!
|