How to Run Python Inline in Sublime Text?

Estimated read time 1 min read

Sublime Text does not support running Python code inline by default. However, there are several plugins that can be installed to provide this functionality. One popular plugin is “SublimeREPL”, which can be installed via the package control.

Once installed, follow these steps to run Python inline in Sublime Text:

  1. Open a new file in Sublime Text.
  2. Select “Python” from the list of available REPLs by clicking on the “Tools” menu, then “SublimeREPL”, and then “Python”.
  3. A new panel should appear at the bottom of the window with a Python prompt.
  4. Type your Python code into the prompt and press enter to execute it.

Alternatively, you can also use the built-in Python console in Sublime Text by selecting “Tools” > “Build System” > “Python” and then pressing “Ctrl+B” to run the code. However, this method does not allow for inline execution of Python code.

You May Also Like

More From Author

+ There are no comments

Add yours

Leave a Reply