Open In App

Run python using sublimeREPL

Last Updated : 07 Jun, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

SublimeREPL extends the capabilities of Sublime Text by allowing you to run Python scripts and interact with a Python REPL directly within the editor. With this setup, you can streamline your development workflow, test code snippets quickly, and see the results in real time without leaving Sublime Text.

In this article, I will guide you through the process of setting up and using SublimeREPL to run Python code directly within sublime text.

Installing Sublime

  • Go to the SublimeText website.
  • Click on Download For Windows.
  • After that, it will start downing sublime in your computer
  • After finishing all the setup and completely installing Sublime on your computer.
  • Open SublimeĀ 

Installing SublimeREPL

  • Click on tools.
  • Click on Install Package Control
  • It will start installing package control
  • After package control install sucessfully
  • Click on Preferences
  • After that click on Package Control
  • Popup window will appear. Type SublimeREPL (as u can see in the blow image)
  • Installation process will be started
  • After the installation process had done
  • Go to Tools->SublimeREPL->Python->Python - Run current file as you can see in the image below:
  • After clicking on that one New Tab will be appear (like shown in the below pic)
  • Congrats! Enter your input you will get your desire output.Ā 

Key press shortcut to run PYTHON using SublimeREPL

  • Go to Preferences
  • Click on Key Bindings
  • A new window will appear.
14F5D79FCB334D7DA090832FFB85389C3
[
{ "keys": ["ctrl+enter"], "command": "run_existing_window_command", "args":
{
"id": "repl_python_run",
"file": "config/Python/Main.sublime-menu"
}}
]
  • Paste the above code in the console or in the window that was appear before.
  • Save (ctrl+s) it as .sublime-keymap extension.
  • Close the window
  • Press ctrl+enter (control+enter) in your keyboard.
  • Your Programs will be execute.

Next Article
Article Tags :
Practice Tags :

Similar Reads