|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
求大佬帮忙解决!
报错如下:
- =========================== RESTART: F:\daima\1.py ===========================
- [0]
- Traceback (most recent call last):
- File "F:\daima\1.py", line 4, in <module>
- g.msgbox('welcome to my module program!')
- TypeError: 'str' object is not callable
- >>>
复制代码
代码如下:
- import easygui as g
- import sys
- while 1:
- g.msgbox('welcome to my module program!')
- msg = 'what do you want to learn from me ?'
- title = 'this is a small game'
- choices = ['laugh', 'cry','make a nice work' ]
- choice = g. choicebox(msg, title, choices)
- g. msgbox = ('your choice is '+choice)
- msg = 'do you want to make another choice ?'
- title = 'yes or no'
- if g.ccbox(msg, title):
- pass
- else:
- sys.exit()
复制代码 |
|