sublime配置python 3环境-可输入

版权声明:看我干嘛? 你又没打算转载我的博客~ https://blog.csdn.net/wjh2622075127/article/details/83240644

系统: win10
软件: sublime text3
python: python 3.6.6
时间: 2018-10-21
插件: sublimeREPL


用过sublime text3 写python3的小伙伴会发现, 在ST3上可以解释py3但无法输入. 无法输入, 那有啥用…

我今天介绍的解决方案是使用插件 sublimeREPL.

插件安装方法自行百度.

安装好后, 在如图所示的页面上对一个python程序进行解释

在这里插入图片描述

每次运行都要这么麻烦? 当然不必. 我们可以自定义快捷方式, 使得一键解释运行.

在如图所示路径下新建快捷方式, 将下面这段代码copy进去. 可以自定义按键.

[
	{
    "keys": ["f5"],
    "caption": "SublimeREPL: Python - RUN current file",
    "command": "run_existing_window_command",
    "args": {
        "id": "repl_python_run",
        "file": "config/Python/Main.sublime-menu"}
    },
    {
    "keys": ["f8"],
    "caption": "SublimeREPL: Python - PDB current file",
    "command": "run_existing_window_command",
    "args": {
        "id": "repl_python_pdb",
        "file": "config/Python/Main.sublime-menu"}
    }, 
    {
    "keys": ["f6"],
    "caption": "SublimeREPL: Python",
    "command": "run_existing_window_command",
    "args": {
        "id": "repl_python",
        "file": "config/Python/Main.sublime-menu"}
    },   
]

在这里插入图片描述

如图

在这里插入图片描述

这样按F5就可以运行python程序了.


有个小问题: 每次运行它都会弹出一个窗口, 而不是像其他编译一样在编译器下方的窗口上.

可以用分屏解决, 但感觉有点不太对.

如何分屏可参考这篇博客

将运行结果放在下边:

在这里插入图片描述

或者在右边

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/wjh2622075127/article/details/83240644
今日推荐