84669 person learning
152542 person learning
20005 person learning
5487 person learning
7821 person learning
359900 person learning
3350 person learning
180660 person learning
48569 person learning
18603 person learning
40936 person learning
1549 person learning
1183 person learning
32909 person learning
from tkinter import * ro = Tk()
python3.4,windows8.1 *64
这句话在交互命令行里是可以执行的,在IDE里也没报错,只是双击打开就会闪退。
在.py里使用其他的都可以正常打开,但是再用tkinter时就会闪退,请问这是为什么?如何解决? 谢谢
小伙看你根骨奇佳,潜力无限,来学PHP伐。
There is no raw_input() in python3. If an error occurs, an exception will be thrown. If it is not handled, it will exit
raw_input()
You saved the .py file and directly double-clicked it to execute it?
.py
The above code is problematic, but the crash prevents you from even seeing the error message.
So, you have to use the correct posture to open the .py 文件,在 Windows file. Under Windows, it is best to do this:
Windows
After executing this, you will see the output and error information in another window.
from tkinter import * ro = Tk() ro.mainloop()
Try adding the last line
There is no
raw_input()
in python3. If an error occurs, an exception will be thrown. If it is not handled, it will exitYou saved the
.py
file and directly double-clicked it to execute it?The above code is problematic, but the crash prevents you from even seeing the error message.
So, you have to use the correct posture to open the
.py
文件,在Windows
file. UnderWindows
, it is best to do this:After executing this, you will see the output and error information in another window.
Try adding the last line