Sublime text 3.x – Download setup customize to run python

Sublime text 3.x is one of the light weight multi platform python editor,one good thing about this editor is that you can even keep a portable version for windows OS.

In this post, we are going to discuss python setup on windows OS

Prerequisite

You should have python installed on your machine, if not follow python on windows

Download

https://www.sublimetext.com/3

Install Packages

Sublime Text doesn’t come with a default setup for python auto suggestion, we need to install some packages to execute python.

To install package in Sublime text

Ctrl + Shift + P | Install Package | <name of package>

Let’s install following packages one by one

This helps in python auto completion or autosuggestion

Helps in python auto completion with added features, find more on Anaconda

This will enable right click context menu option “create python package” on project structure

Run command

To run or execute python on sublime text, key press Ctrl + b

File | new file and save as test.py

Let’s see in action

Key press Ctrl+b and see the output

Customization

To increase font size

Preferences | Settings | preferences.sublime.settings – user

“font_size”: 12;

and save

To view folder structure of current project

View | Side bar | Show Open Files

Link to specific python version

Create a new file

Note : Under “cmd” – mention path of python installed, in my case it is c:\\python folder

Save the file with name “myPython.sublime-build” under …\Data\Packages\User [for portable version]

if installed, then under %AppData%\Roaming\Sublime Text 3\Packages\User

Keep “myPython” selected when you run the script, you can do this under Tools | Build System | myPython

Content posted is based on learning or working experience, Share the post with others if find useful, Any queries?, leave comments or discuss on our facebook:qavalidation.com, Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

%d bloggers like this: