python - sublime console 运行 交互输入Yes or No ( SublimeREPL插件)

SublimeREPL可以设置一个编译运行的快捷键,具体操作为:Preferences->Key Bindings-User。

 

[
{
"keys":["ctrl+m"],"command":"repl_open",
"caption": "Python",
"mnemonic":"p",
"args":{
"type":"subprocess",
"encoding":"utf-8",
"cmd":["Python","-i","-u","file"],"cwd":"file_path",
"external_id":"python"
}
}
]

ctrl+m 运行console出来,输入n,执行end

 

 Join = input('Would you like to write to text file?\n') #need to find a way to run

if Join in ['yes', 'Yes','Y','y']:
test()
else:
print("end")
sys.exit()

posted @   po-A  阅读(319)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
· 三行代码完成国际化适配,妙~啊~

Tushare大数据开放社区-免费提供各类金融数据和区块链数据 , 助力智能投资与创新型投资。

Python, Matlab, R, Web数据抽取学习交流。

点击右上角即可分享
微信分享提示