|
马上注册,结交更多好友,享用更多功能^_^
您需要 登录 才可以下载或查看,没有账号?立即注册
x
我看了小甲鱼视频,把PROPORTIONAL_FONT后面的改成 “微软雅黑”,宽度等也改成和视频中一样的
但是代码执行错误,我在修改之前是可以执行的
代码如下:
import easygui as g
import sys
while 1:
g.msgbox("嗨,欢迎进入第一个界面小游戏^_^")
msg ="请问你希望在鱼C工作室学习到什么知识呢?"
title = "小游戏互动"
choices = ["谈恋爱", "编程", "OOXX", "琴棋书画"]
choice = g.choicebox(msg, title, choices)
# note that we convert choice to string, in case
# the user cancelled the choice, and we got None.
g.msgbox("你的选择是: " + str(choice), "结果")
msg = "你希望重新开始小游戏吗?"
title = "请选择"
if g.ccbox(msg, title): # show a Continue/Cancel dialog
pass # user chose Continue
else:
sys.exit(0) # user chose Cancel
和源代码一模一样
错误如下:
文件“C:\用户桌面\戴尔\ \测试。在<模块>中,第1行
进口easygui g
戴尔用户文件“C:\ \ \ AppData \本地Python \程序\ \ Python36-32 \ lib \网站\ easygui。py”,1470行
okButton =按钮(buttonsFrame,takefocus = YES,text ="OK ",height = 1FA,width =6)
^
SyntaxError:无效的语法
Traceback(最近的通话):
文件“C:\用户桌面\戴尔\ \测试。在<模块>中,第1行
进口easygui g
戴尔用户文件“C:\ \ \ AppData \本地Python \程序\ \ Python36-32 \ lib \网站\ easygui。py”,1470行
okButton =按钮(buttonsFrame,takefocus = YES,text ="OK ",height = 1FA,width =6)
^
SyntaxError:无效的语法
请大神不吝赐教!
谢谢!
|
|