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"}
}}
]
Auf dieser Seite können Sie das Online-Video Keybinding Sublime text 3.2 - Repl for Python mit der Dauer stunde minuten sekunde in guter Qualität ansehen, das der Benutzer John Starfire 14 März 2019 hochgeladen hat, den Link mit Freunden und Bekannten teilen, dieses Video wurde auf Youtube bereits 6,520 Mal angesehen und es wurde von 103 den Zuschauern gefallen. Viel Spaß beim Betrachtenden Zuschauern gefallen!