热线电话:13121318867

登录
2019-02-13 阅读量: 965
执行python脚本闪退问题

执行test.py的时候闪退,脚本内容如下

print ("Hello World!")
print ("Hello Again!")
print ("I like typing this.")
print ("This is fun.")
print ('Yay! Printing.')
print ("I'd much rather you 'not'.")
print ('I "said" do not touch this.')

这是什么原因?

答:

不是闪退,是程序运行完自己退出关闭窗口了

import os
os.system("pause")

这样可以保证,打印完所有信息之后,等待你的输入才结束运行

0.0000
0
关注作者
收藏
评论(0)

发表评论

暂无数据
推荐帖子