• sublime如何在终端运行python


    首先打开cmd,运行一下这个代码:start cmd /c " python "$file" & pause"
    然后打开sublime-tool-build system-build new system
    删除所有 copy-paste下面这些代码:
    {
    // 指定python.exe的目录【针对未将python加入环境变量的】
    // "path": "",
    "shell_cmd": "python -u "$file"",
    "file_regex": "^[ ]*File "(...*?)", line ([0-9]*)",
    "selector": "source.python",
    "env": {"PYTHONIOENCODING": "utf-8"},
    "variants":
    [
    {
    "name" :"Run cmd",
    "shell" :true,
    "shell_cmd":"start cmd /c " python "$file" & pause""
    }

    ]
    }
    保存名字为PythonRun.sublime-build
    然后打开一个python程序:按ctrl+shift+b
    选择python run cmd
    就可以了
    以后再运行python程序就之家按ctrl+B就可以了 就会调用cmd来运行python了

  • 相关阅读:
    【PKUWC2018】Minimax
    Codeforces Round #673
    【BZOJ1901】Dynamic Rankings
    【笔记】树状数组
    【CF1420E】Battle Lemmings
    Codeforces Round #672
    Problem A: STL——灵活的线性表
    algorithm
    iterator
    TRY vector
  • 原文地址:https://www.cnblogs.com/shunguo/p/11396976.html
Copyright © 2020-2023  润新知