Go in preferences (Sublime text 3.2 for Windows) and then keybinding. In the user file (that will be on the right of the screen), copy and paste the following code so that you can launch a python file opened from Sublime text just hitting the keyboard keys ctr+b (or another combination of your choice). Remember to change the path of the directory to your python.exe file. To know where you installation of Python is, launch Python in the cmd and import sys and then with sys.path look where it is and substitute the string down here. REMEMBER to change the \\ with / if you copy and paste the directory location of python.exe, otherwise it won's save on build the file. Here I explain this: • Video
Read my post: https://pythonprogramming.altervista....
This is what you have to put into the keybinding file (the user's one that will open on the right) . PS: I finally found why it worked, but it didn't autosave on build: when you go and find the path where your python.exe is, do not forget to use / instead of \\, this is why it do not ausaved on build for me (remember to check the autosave on build option in the tool menu). :)
[
{"keys": ["ctrl+b"], "command": "repl_open",
"caption": "Python - RUN current file",
"id": "repl_python_run",
"mnemonic": "d",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["C:/Users/giova/AppData/Local/Programs/Python/Python37-32/python.exe", "-u", "-i", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python/Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"}
}}
]
Nesta página do site você pode assistir ao vídeo on-line Keybinding Sublime text 3.2 - Repl for Python duração hora minuto segundo em boa qualidade , que foi baixado pelo usuário John Starfire 14 Março 2019, compartilhe o link com seus amigos e conhecidos, no youtube este vídeo já foi visto 6,520 vezes e gostou 103 espectadores. Boa visualização!