How do I run Python code from Sublime Text 2?

552    Asked by Diyatomar in Python , Asked on Mar 2, 2021

I want to set up a complete Python IDE in Sublime Text 2.

I want to know how to run the Python code from within the editor. Is it done using the build system? How do I do it?

Answered by Diya tomar

To run Python code from Sublime Text 2 you can follow the given steps:-

Go to Sublime Text’s Tools -> Build System -> and (choose) Python then:

To Run the code following the given steps:

Tools -> Build -or- Ctrl + B CMD + B (OSX)

The above step will start your file in the console which should be at the bottom of the editor.

To stop the code from running follow the below-mentioned steps:

Ctrl + Break or Tools -> Cancel Build Fn + C (OSX)



Your Answer

Interviews

Parent Categories