Answer the question
In order to leave comments, you need to log in
How to run Python code in Sublime?
I started learning python, chose Sublime 3 as an IDE, but ran into a compilation problem, if I may say so. When you press the ctrl + b key combination, only the program execution time is displayed on the console, but nothing else, what's the problem?
Answer the question
In order to leave comments, you need to log in
Sublime text is a wonderful thing, you can make full-fledged IDEs even for all programming languages.
The whole setup comes down to installing Pasckage Control and the SublimeREPL extension, creating a new build sustem, with the content
{
"target": "run_existing_window_command",
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}
And editing the file "config/Python/Main.sublime-menu" in the directory depending on the system
If Windows then:
C:\User\User\AppData\Roaming\Sublime Text 3\Packages\User\SublimeREPL-python.sublime- build
Linux:
/home/User/.
{"command": "repl_open",
"caption": "Python - RUN current file",
"id": "repl_python_run",
"mnemonic": "R",
"args": {
"type": "subprocess",
"encoding": "utf8",
"cmd": ["python3", "-u", "-i", "$file_basename"],
"cwd": "$file_path",
"syntax": "Packages/Python /Python.tmLanguage",
"external_id": "python",
"extend_env": {"PYTHONIOENCODING": "utf-8"
}
}the difference will be only in the line
"cmd": ["python3", "-u", "-i", "$file_basename"]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question