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 @ 2022-03-18 04:32  po-A  阅读(344)  评论(0)    收藏  举报

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

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