Running Python interactively from within Sublime Text 2

前端 未结 5 1552
情歌与酒
情歌与酒 2020-12-05 05:54

I have looked at all the answers on this forum but I\'m missing something. I want to be able to hit Cmd+B while editing a Python file \"myfile.py\" in

5条回答
  •  时光取名叫无心
    2020-12-05 06:05

    Try to update your user keybindings:

    [
        { "keys": ["super+shift+r"], "command": "repl_open", 
                     "caption": "Python",
                     "mnemonic": "p",
                     "args": {
                        "type": "subprocess",
                        "encoding": "utf8",
                        "cmd": ["python", "-i", "-u", "$file"],
                        "cwd": "$file_path",
                        "syntax": "Packages/Python/Python.tmLanguage",
                        "external_id": "python"
                        } 
        }
    ]
    

提交回复
热议问题