sublime python3 输入换行不结束的方法
sublime编辑模式下,编译py文件,enter键后并没有打印,发现是sublime编译方式的问题,需要安装插件sublimeREPL。
#!/usr/bin/python3
str = input("请输入: ")
print(str)
安装完之后,点击tool--sublimeREPL-- Python-- Python - RUN current file,就可以正常的编译,输入一行后打印

由于每次编译都需要这步操作,会很麻烦,可以设置快捷键:
点击Preferences--key Bindings,设置快捷键,本次设置的是f5,可以自行修改

[
{"keys": ["f5"],"command": "repl_open",
"caption": "Python - RUN current file",
"id": "repl_python_run",
"mnemonic": "R",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["python", "-u", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
}
}
] 相关推荐
chuckchen 2020-10-31
Dreamhome 2020-10-09
xirongxudlut 2020-09-28
星辰大海的路上 2020-09-13
chaochao 2020-08-31
猪猪侠喜欢躲猫猫 2020-08-17
快递小可 2020-08-16
shengge0 2020-07-26
巩庆奎 2020-07-21
张文倩数据库学生 2020-07-19
xirongxudlut 2020-07-18
Ericbig 2020-07-18
kyelu 2020-07-09
liangzhouqu 2020-07-07
GuoSir 2020-06-28
chaigang 2020-06-27
pythonxuexi 2020-06-25