This question already has an answer here:
Is it possible to set up sublime text for full stack python development. By this, I mean the following: 1. python shell where I can input an expression and instantly get the result, 2. the shell will work for the 'input' method, which will prompt the user to enter data.
I have installed the theme and color scheme, but the console/shell is not working or I did not get the correct package from the package control. I want an environment where I can work in the sublime text without shifting into the IDLE. Please help me kindly if you know how to do it.
There are several ways to do this:
As @cricket_007 states you can install SublimeREPL and run the current file via
Tools >>> SublimeREPL >>> Python >>> Python - Run current file
. This interprets the python file in a Sublime Text view and inputs are possible. However since this is not a build system you can create a build system from this (clickTools >>> Build System >>> New Build System...
and paste):As an alternative one could run the file in a terminal, by using the following build system. This will create a new terminal and execute the file in python and afterwards await pressing enter.
Feel free to add the osx option