Запуск программ Python на Sublime Text 3
Привет разработчикам Python, здесь мы узнаем, как запускать программы python в редакторе Sublime Text 3, загружать и устанавливать Sublime Text 3, устанавливать пакеты и многое другое.
Существуют различные IDE и текстовые редакторы для запуска кода python. Если вы новичок, то это нормально использовать текстовый редактор, но если вы разработчик, то, без сомнения, вы будете знакомы с важностью IDE. И вы также можете обратиться к этой ссылке Best Python IDEs для подробного объяснения Python IDEs . Хотя Sublime Text 3 — это текстовый редактор, но он имеет некоторые IDE-подобные функции, такие как проекты и “сборки” для выполнения других программ изнутри редактора.
Редактор Sublime Text 3
Преимущества
- Это легкий редактор для разработчиков.
- Он наиболее популярен среди разработчиков.
- Самое лучшее в Sublime Text 3 то, что он не требует много места для установки и работать с ним очень удобно и комфортно.
- Sublime Text 3.0 был выпущен 13 сентября 2017 года.
- Он изначально поддерживает множество языков программирования, а также языки разметки.
Особенности Sublime Text 3
- Кросс-платформенный
- Sublime Text 3 может работать на Windows, Linux и Mac.
- Вам нужна только одна лицензия для использования Sublime Text 3 на каждом компьютере, на котором вы хотите использовать Sublime Text 3, независимо от того, какую ОС они используют.
- Мощная экосистема API и пакетов
- Sublime Text 3 предоставляет множество мощных API Python, которые позволяют плагину выполнять множество встроенных функций.
- Sublime Text раскрывает свои внутренние компоненты через интерфейс прикладного программирования (API), с которым программисты могут взаимодействовать с помощью языка программирования Python.
- Встроенный интерпретатор Python включен в редактор. Встроенный интерпретатор полезен для проверки настроек редактора и быстрого тестирования вызовов API при разработке плагинов.
Палитра команд
Это еще одна мощная особенность Sublime Text 3. Он позволяет выполнять различные функции, такие как сортировка, изменение синтаксиса, а также изменение параметров идентификации.
Используя палитру команд, вы можете получить доступ ко многим вещам, таким как обработка проектов sublime, изменение синтаксиса файлов, вызов команд пакета и т. д. Чтобы использовать палитру команд – нажмите ctrl+shift+p, затем выберите команду и нажмите Enter.
Множественный выбор
Это одна из лучших особенностей Sublime Text 3. Используя эту функцию, вы сможете изменять несколько строк одновременно, а также быстрее манипулировать файлами. Он работает как быстрая замена для поиска и замены или для применения одной и той же последовательности изменений к нескольким строкам одновременно.
Чтобы использовать множественное выделение, выделите блок текста, затем нажмите Ctrl+Shift+L, чтобы разделить его на одно выделение в строке, а затем нажмите Ctrl+D, чтобы выбрать следующее вхождение выбранного слова.
Другие Особенности
Помимо вышеперечисленных функций Sublime Text 3 имеет также некоторые другие функции, такие как:
- Функция проверки орфографии
- Автоматическое сохранение
- Настраиваемые привязки клавиш
- Макросы
- Разделение редактирования
- Расширенные настройки
Sublime Run Python Tutorial – Запустите свою первую программу
Без сомнения, Sublime text является самым любимым текстовым редактором в сообществе разработчиков и может служить отличным текстовым редактором Python. Итак, теперь мы увидим, как использовать его для python.
Загрузка и установка
Прежде всего, вы должны скачать его. Ссылка для скачивания-https://www.sublimetext.com/3 Вы увидите описание версии следующим образом:
И теперь вы должны выбрать один из них в качестве требования к вашему компьютеру. Установите скачанный файл.
Протестируйте простую программу
Теперь мы увидим выполнение программы python на SublimeText 3. Для этого мы должны сделать вот что:
- Прежде всего откройте свой редактор sublime.
- Создайте новый файл, выполнив следующие действия File->NewFile или нажав ctrl+N .
- Затем сохраните этот файл как yourfilename.py . Расширение должно быть .py .
- Затем напишите свой код.
Здесь берем простую программу, то есть сложение двух чисел. Так что код есть:
num1 = 7
num2 = 9
# Сложите два числа
sum = float(num1) + float(num2)
# Отображение суммы
print(‘Сумма <0>и <1>равна <2>’.format(num1, num2, sum))
Запуск Кода
Перейдите в пункт Инструмент в строке меню, а затем нажмите кнопку Построить систему и внутри нее выберите пункт Python. Затем перейдите в раздел Tool option и нажмите кнопку Build option, которая выполнит ваш код.

Итак, теперь, запустив приведенный выше код, мы получим следующий вывод:
Поздравляем, код python успешно работает на sublime! Надеемся, что эта статья будет полезна для вас. И если у вас есть какие-либо вопросы по поводу SublimeText 3, оставляйте свои комментарии!
Use Sublime!
Switching to Sublime has been the single biggest productivity booster in years. First, take a look at how beautiful it is:

What is it?
Sublime Text is a free, cross-platform source code editor. You can easily add multiple plugins to extend its functionality, making it possible to edit and compile Stata code, Python scripts, R, LaTeX, Julia… the list is endless. You can also customize several other aspects like multiple-column layout or keyboard shortcuts, just to name a couple of examples.
You may be wondering what’s so special about running a Python script and compiling a LaTeX document from the same editor, since you may already use a Python IDE like PyCharms and a perfectly fine LaTeX editor like Texmaker. Thing is, large projects are usually complex and require handling a wide variety of files, so having one lightweight, customizable editor that can handle all of them makes it easier to both stay on top of the big picture and quickly dive into any kind of code for additional work.
Initial set up
Head over to sublimetext.com, download and install Sublime Text 3 (ST3) for your operating system.
After installing ST3 it is essential that you also install Package Control, which lets you easily add and remove additional plugins. Just follow these instructions to install it.
Customization
ST3 is a bit bare bones when first installed. However, it is extremely customizable. Below I share all my custom options, which have been thoroughly tested in MacOS, Linux and Windows.
Theme
The whole look of ST3 can be customized by installing themes. I know this is a matter of personal taste, but after trying many (many) themes, my current personal favorite is Monokai Pro. It is dark (of course), minimal and looks great in Windows and MacOS. To install it just invoke the command palette ( Tools ‣ Command Palette ), type install and hit Return . Then search for Monokai Pro and hit Return again to install it.

Monokai Pro also has a bunch of “color filters” which let you change the overall feel of the theme. You can play around with them by going to Tools ‣ Command Palette ‣ Monokai Pro: select theme .
Sidebar
Although it isn’t visible at first, ST3 comes with a handy sidebar in which you can drop your project folders for easy access, besides listing all your open files. To activate it just go to View ‣ Side Bar ‣ Show Side Bar , and you will see something like the screenshot below:

I also recommend that you install SideBarEnhancements, a plugin that adds a ton of useful functions for manipulating files and folders in the sidebar (you cannot even Move to trash without it!). To install it just invoke the command palette ( Tools ‣ Command Palette ), type install and hit Return . Then search for SideBarEnhancements and hit Return again to install it.
Development environment
Using Package Control we can easily add plugins that will let us use ST3 to edit and compile the following programs:
32 or 64 bits?
Before you continue, it is important to be sure whether you have a 32 or 64 bit operating system. The answer will determine which version of software you should install: if you have 32 bits, then you must choose 32 bit versions. If you have a 64 bits OS, then you can choose either… but it usually makes more sense to go for 64 bits software as well.
In Windows you can find out your system type by right-clicking on “This PC” (or “My Computer”, in older Windows) and selecting “Properties”. Look for “System type”, like in the screenshot below:

On macOS (macOS?), select “About This Mac” from the Apple menu ( ) and you should see a pane like the one below:

Getting R to work with ST3 is pretty easy. If you haven’t already, go to the R-project and install the appropriate version for your OS. Once you’ve done that, you need to add R to you environment path. First locate your installation folder, which in Windows is something like
Inside you should see a folder for every version of R you have in your system. Go into the latest one and locate the bin\x64 or bin\x32 folder, depending on which version of R you installed. For example, the full directory in my Windows system is
To add this path, right-click on My Computer and choose Properties > Advanced (System Settings) > Environment Variables. Edit the Path variable (User or System, your choice) and add a line with the path you just located above. Accept these changes and then fire up the command line, where you should be able to execute R now:
Now you can run R scripts directly from within Sublime. To test it, create a new file with .R extension and write some R code, for example,
In order to run this simple script with R you need to choose your build system: go to Tools > Build System and choose R. Now you can select Tools > Build (or just hit Ctrl+B) to run this code! You should see the output on the Console pane of ST, on the bottom of your screen.
Python
Setting up a Python developing environment in ST3 is very easy, and the process is similar to R. First you’ll need to install Python in your machine. For data science, I recommend getting the Anaconda Python distribution.
Python 2.7 or 3.X?
Whether to use Python 2 or 3 is still a hotly debated topic, as a Google search will reveal. My recommendation is to take it easy, because (a) their syntax is fairly similar, (b) you can later switch and (c) the “typical” data science packages work for both versions. So I’d choose whatever version the book you’re using or the colleague you’re working with is using. If you have no reason to choose one or the other, then I’d probably go with Python 3, because that is the future, after all.
Install Python
Download and install the appropriate version of Anaconda Python (the process is fairly straightforward). Once you’re done, check that it is properly installed by firing up the Command prompt (Windows) or the Terminal (macOS) and just write down python . You should see the Python version and the Python shell ready:
Cool! Now you can use it as a fancy calculator:
Just type quit() to exit the Python shell.
Run a Python script in ST
Sublime supports Python without any further configuration, so you can just create a new file ending with .py extension and write some Python code:
You should be seeing the code with syntax highlighting, similar to the above code block. If you don’t, make sure you see “Python” at the bottom right corner of your ST editor window.
Now, in order to build with Python just go to Tools > Build. The output should be visible in the Console pane of ST3, which is in the bottom. If you run into any issues, make sure to check whether Tools > Build System is set to “Python”.
Further enhancements
If you wish to turn ST into a fully featured Python IDE, then you should install the Anaconda plugin (totally unrelated to the Anaconda Python distribution, btw). It enables autocompletion, code linting and a myriad of other fancy stuff.
To install it, just bring up the Command Palette with Ctrl+Shift+P , type “install”, hit Enter and search for “Anaconda”. Just hit Enter again to install, and restart ST to see the changes.
Stata
Getting Stata to work with ST3 requires a few steps, but it works very well when all is said and done. The process is quite different for Windows and macOS, so I’ve split this tutorial in two sections. I’m assuming that you already have Stata up and running (these steps will work with all versions > 10).
Windows
There are two Stata plugins for ST in Windows: StataEditor and Stata Enhanced. I tried both and finally preferred StataEditor, so that’s the one we’ll install and configure.
- Install StataEditor: in ST3, start the command palette with Ctrl+Shift+P , type “install” and hit Enter . Now search for StataEditor and just click on it to install.
- Install Pywin32: repeat the process described above, now installing the Pywin32 plugin.
Configure StataEditor: In ST3 go to Preferences > Package Settings > StataEditor > Settings — User. In this blank file you need to write down the path to your Stata executable and the version. For example, my configuration file in Windows looks like this:
Register Stata Automation library: go to the Stata executable for which you copied the path (e.g. StataMP-64.exe ) and create an shortcut for it. Now right click on this new shortcut and select “Properties”. In the “Target” field, add /Register at the end (with a preceding space). For example:
Apply and accept those changes and now right click again on the shortcut and choose to “Run as administrator”. Nothing is going to happen, but if you followed the instructions, it should be ready.
Restart ST3 and try opening an existing do-file (or creating a new one with .do extension). You should read “Stata” on the bottom right corner, and should be able to execute selections or complete do-files with Ctrl+D .
macOS
There are two packages available in Package Control to use ST3 as a Stata editor: Stata Enhanced and Stata Improved Editor. I’ve tried both and prefer Stata Improved Editor, mainly because it has a much finer control on the chunks you can execute. Shout out to Zizhong Yan for incorporating my comments in v1.1.2.
In order to Install Stata Improved Editor in ST3, start the command palette with Cmd+Shift+P , type “install” and hit Enter . Now search for Stata Improved Editor and just click on it to install. Reboot ST3, and that’s it!
CTRL + d sends the current line or the selected chunk to Stata. Also, you can execute the complete do-file with CTRL + SHIFT + d . The plugin has a lot of shortcuts and other nice features, so be sure to check out its repository to make the most out of it.
LaTeX
ST3 can be configured to work as a LaTeX editor pretty easily, specially if you’ve installed one of the “typical” TeX distributions: TeX Live, MiKTeX or MacTeX. If you don’t have LaTeX in your system, I suggest you get either TeX Live in Windows or MacTeX in MacOS. Just ensure you have one of these TeX distributions installed before proceeding.
Besides the LaTeX distribution, another important component is the PDF viewer… and forget about the defaults! On Windows I recommend you get Sumatra (thank me later for this awesome alternative to Adobe’s piece of crap). Just go to https://www.sumatrapdfreader.org/free-pdf-reader.html to download, and then install it.
On macOS I recommend Skim, a lightweight PDF viewer specifically tailored to reading and annotating scientific papers. Head over to http://skim-app.sourceforge.net/ to download and install it. After installing it make sure you go to Skim ‣ Preferences ‣ Sync and set the PDF-TeX Sync support Preset to Sublime, as shown here:

Both of these viewers are super lightweight, work great with LaTeXTools and provide forward and inverse search capabilities, which is really handy (go here to read more about this feature).
Without regard of your operating system, you’ll want to install LaTeXTools, which adds extensive LaTeX support for ST3. Install by invoking the command palette ( Tools ‣ Command Palette ), type install and hit Return . Then search for LaTeXTools and hit Return again to install it. You should use the same method to install LaTeX-cwl , which allows for autocompletion of LaTeX commands:

At this point you should run a system check with LaTeXTools, which ensures everything is well configured for LaTeX compilation. To do this, fire up the command palette ( Tools ‣ Command Palette ), search for LaTeXTools: Check System and hit Return . After a few seconds you should see a new tab with something like the following:

System is checked and we’re good to go! Don’t panic if ghostscript or magick are unavailable (like above): the former is used for equation and image previewing, while the latter is for previewing non-standard image formats.
So that’s it! You can now open any .tex file or create a new one, and compile it with Ctrl+B . If a dialogue pops up, just choose PDFLaTeX (or whatever you prefer) and LaTeX away!
Setting Up Sublime Text 3 for Full Stack Python Development
Sublime Text 3 (ST3) is a lightweight, cross-platform code editor known for its speed, ease of use, and strong community support. It’s an incredible editor right out of the box, but the real power comes from the ability to enhance its functionality using Package Control and creating custom settings.
In this article, we’ll look at how to setup Sublime Text for full stack Python development (from front to back), enhance the basic functionality with custom themes and packages, and use many of the commands, features, and keyword shortcuts that make ST3 so powerful.
Note: This tutorial assumes you’re using a Mac and are comfortable with the terminal. If you’re using Windows or Linux, many of the commands will vary, but you should be able to use Google to find the answers quickly given the info in this tutorial.
Before we start, let’s address what I mean exactly by “full stack.”
In today’s world of HTML5 and mobile development, JavaScript is literally everywhere. EVERYWHERE. Python coupled with a framework such as Django or Flask is not enough. To really develop a website from end-to-end, you must be familiar with JavaScript (and the various JavaScript frameworks), REST APIs, responsive design, and of course HTML and CSS, and so on.
Let’s face it: as a programmer, you are like any other craftsman. If you want to be the best you can be, then you need your tools to be sharp. Your development environment must be set up for full stack development—which is exactly what we are going to do right now.
Free Bonus: 5 Sublime Text Tweaks to Boost Your Python Productivity, a free course that shows you how to optimize your Python development setup.
Features
Let’s start by looking at a few of the default features of Sublime Text 3:

Split Layouts allow you to arrange your files in various split screens. This is useful when you are doing test driven development (Python code on one screen, test scripts on another) or working on the front end (HTML on one screen, CSS and/or JavaScript on another).
Vintage Mode provides you with vi commands for use within ST3.
Note: You can also create your own snippets: Tools > New Snippet. Refer to the documentation for help, and also check out some of my snippets here.
Customizing Sublime Text 3
After you download ST3, you can customize it.
Install the subl command line tool
Just Like TextMate has the mate command, Sublime Text has a command line tool called subl that allows you to open one file, or an entire directory of files and folders, from the terminal.
To enable this command, create a symbolic link to the subl binary:
Ensure that the link works by opening Sublime:
If that didn’t work, you probably need to add /bin to your path:
Then repeat step one.
Note: If you are still having trouble, check out this article for help. You can also read up on creating the symbolic links in Windows and Linux.
Now you can open a file or directory using the following commands:
If there are spaces in the path, you must surround the entire path in double quotes:
To view all the commands, open up the help file:
Install Package Control
To begin taking advantage of the various packages for extending Sublime’s functionality, you need to manually install the package manager called Package Control. Once you have it installed, you can use it to install, remove, and upgrade all other ST3 packages.
- To install, copy the Python code for Sublime Text 3 found here. Click View > Show Console to open the ST3 console. Paste the code into the console. Press Enter . Reboot ST3.
- You can now install packages by using the keyboard shortcut Cmd + Shift + P . Start typing install until Package Control: Install Package appears. Press Enter and search for available packages.
Here are some other relevant commands:
- List Packages shows all your installed packages.
- Remove Package removes a specific package.
- Upgrade Package upgrades a specific package.
- Upgrade/Overwrite All Packages upgrades all your installed packages.
Check out the official documentation to view more commands.
Create a Custom Settings File
You can fully configure Sublime Text using JSON-based settings files, so it’s easy to transfer or synchronize your customized settings to another system. First, we need to create our customized settings. It’s best to create a base file for all environments as well as language-specific settings files.
To set up a base file, click Sublime Text > Preferences > Settings — User. Add an empty JSON object to the file and add your settings like so:
- For language specific settings, click Sublime Text > Preferences > Settings — More > Syntax Specific — User. Then save the file using the following format: LANGUAGE.sublime-settings. For Python-specific settings, save the file as Python.sublime-settings.
- You can obviously configure your settings to your liking. However, I highly recommend starting with my base and Python-specific settings and then making changes as you see fit.
- Optional: You can use Dropbox to sync all your settings. Simply upload your settings files to Dropbox and load them from there to sync the Sublime environments on all your machines.
- A good reference for settings can be found at the Sublime Text Unofficial Documentation.
Themes
ST3 also gives you the option to change the overall theme to better suit your personality. Design your own. Or, if you’re not artistically inclined, you can download one of the various custom themes designed by the Sublime community through Package Control. Check out ColorSublime to preview themes before installing them.
The ever popular Soda Dark Theme and the minimal Flatland are two of my personal favorites.
After installing a theme, make sure to update your base settings through Sublime Text > Preferences > Settings — User:
Packages
Besides the packaged themes, I take advantage of the following packages to speed up my workflow.
SideBarEnhancements
SideBarEnhancements extends the number of menu options in the sidebar, speeding up your overall workflow. Options such as New File and Duplicate are essential and should be part of ST3 out of the box. The Delete option alone makes it worth downloading. This feature simply sends files to the Trash, which may seem trivial, but if you delete a file without it, then it’s very difficult to recover unless you’re using a version control system.
Download this now!
Anaconda
Anaconda is the ultimate Python package. It adds a number of IDE-like features to ST3 including the following:
- Autocompletion works by default, but there are a number of configuration options.
- Code linting uses either PyLint or PyFlakes with PEP 8. I personally use a different linting package, as I will explain shortly, so I disable linting altogether within the user-defined Anaconda settings file, Anaconda.sublime-settings, via the file menu: Sublime > Preferences > Package Settings > Anaconda > Settings — User:
- McCabe code complexity checker runs the McCabe complexity checker tool within a specific file. If you’re not familiar with what complexity is, be sure to visit the link above.
- Goto Definitions finds and displays the definition of any variable, function, or class throughout your entire project.
- Find Usage quickly searches where a variable, function, or class has been used in a specific file.
- Show Documentation shows the docstring for functions or classes (if defined, of course).
You can view all of the features here or within the README file in ST3’s Package Settings: Sublime Text > Preferences > Package Settings > Anaconda > README.
Note: SublimeCodeIntel is another popular package that has many of the same features as Anaconda. I suggest testing them both out.
Djaneiro
Djaneiro supports Django templating and keyword highlighting and provides useful code snippets (tab completions) for Sublime Text. The snippet system is an incredible time-saver. You can create common Django blocks with only a few keystrokes for templates, models, forms, and views. Check out the official documentation to see a list of snippets.
My personal favorites are for templating: var creates << >> and tag creates <% %>.
requirementstxt
requirementstxt provides autocompletion and syntax highlighting as well as a nice version management system for your requirements.txt files.
SublimeLinter
SublimeLinter is a framework for ST3 linters. The package itself does not include any actual linters; those must be installed separately via Package Control using the SublimeLinter-[linter_name] naming syntax. You can view official linters here. There are also a number of third party linters, which can be viewed in Package Control. Check out the installation instructions here.
Note: Most of these linters have dependencies associated with them, so please read the installation instructions before installing.
You can customize each linter in the user-defined SublimeLinter.sublime-settings file: Sublime Text > Preferences > Package Settings > SublimeLinter > Settings — User. For example, I ignore the following PEP 8 errors and warnings:
GitGutter
GitGutter shows little icons in ST3’s gutter area that indicate whether a line has been inserted, modified, or deleted since the last commit.
Note: If you want support for a number of distributed version control systems (Git, SVN, Bazaar, and Mercurial), check out Modific.
FTPSync
FTPSync syncs your project with your remote files. Simply open the file to download it (if the remote file is newer than your local file) and upload it to your remote server with every save. That’s a great way to keep your local and remote(s) in sync. You’ll want to make sure to add at least one remote connection by clicking Sublime Text > Preferences > Package Settings > FTPSync > Setup FTPSync.
I personally set the password to null because I don’t want it visible in that file. FTPSync just asks for my password after each save.
AdvancedNewFile
AdvancedNewFile is used to create a new folder or file from within ST3 with key bindings alone.
Simply bring up the AdvancedNewFile input through the appropriate key binding. Then, enter the path, along with the file name into the input field. Upon pressing Enter , the file will be created. In addition, if the directories specified do not yet exist, they will be created. By default, the path to the file being created will be filled shown in the status bar as you enter the path information.
For a more detailed explanation on its usage, check out the documentation on GitHub. Be sure to read about Tab Completion as well as Predefined Aliases.
I replaced the normal Cmd + N command to create a new file with AdvancedNewFile by adding the following code to the Key Bindings — User file: Sublime Text > Preferences > Package Settings > AdvancedNewFile > Key Bindings — User:
You can also setup a default directory to start with: Sublime Text > Preferences > Package Settings > AdvancedNewFile > Settings — User
Now when I create a new file, the /Users/michaelherman/Documents/repos string is automatically inserted first, since 99% of the time I store all my scripts in that directory.
Emmet
Emmet, previously known as Zen Coding, uses simple abbreviations to generate HTML or CSS code snippets.
For example, if you type a bang, ! , and press Tab in an HTML file, then the HTML5 doctype and a few basic tags will be generated:
Check out the official documentation as well as this handy cheat sheet for more info.
Markdown Preview
Markdown Preview is used for previewing and building markdown files.
To use, open the Package Manager and type Markdown Preview to show the available commands:
- Markdown Preview: Python Markdown: Preview in Browser
- Markdown Preview: Python Markdown: Export HTML in Sublime Text
- Markdown Preview: Python Markdown: Copy to Clipboard
- Markdown Preview: GitHub Flavored Markdown: Preview in Browser
- Markdown Preview: GitHub Flavored Markdown: Export HTML in Sublime Text
- Markdown Preview: GitHub Flavored Markdown: Copy to Clipboard
- Markdown Preview: Open Markdown Cheat Sheet
Once converted, the output file will be updated on each subsequent save.
Keyboard Shortcuts
- Goto Anything Cmd + P is used for quickly finding and opening files. Just type in a part of a path and filename within a project and you can easily open that file. This is great for quickly opening files in large Django projects.
- Goto Line Number Ctrl + G takes you to a specific line number in an active file.
- Goto Symbol Cmd + R lists all functions and classes within a file to make them easier to find. Simply start typing the one you want.
- Go to beginning of line Cmd + Left and Go to end of line Cmd + Right help you navigate within lines.
- Delete current line Ctrl + Shift + K deletes the current line.
- Multi-Edit is by far my favorite shortcut:
- Select a word and press Cmd + D to select the next same word. Then press Cmd + D again to select the next same word again, and so on.
- Press Cmd + Left Button to create a cursor for editing everywhere you click.
Note: For more shortcuts, take a look at this article.
Custom Commands
It’s easy to write your own custom commands and key bindings with Python. I currently use this workflow:
- Copy the path of the current file to the clipboard (link).
- Close all tabs except the active one (link).
Install these by adding the Python files to your /Sublime Text 3/Packages/User directory via the file menu (Sublime > Preferences > Browse Packages) and then opening the User directory. To complete the setup, bind them from the Key Bindings — User file (Sublime Text > Preferences > Package Settings > AdvancedNewFile > Key Bindings — User).
Additional Resources
Free Bonus: 5 Sublime Text Tweaks to Boost Your Python Productivity, a free course that shows you how to optimize your Python development setup.
Conclusion
I hope that this article was helpful to you and that you were able to integrate some of the above packages and custom settings along with your own based on your personal preferences to improve your workflow.
If you have any questions or suggestions of your own, please let me know in the comments below. Finally, check out the dotfiles folder in this repo to view all the resources that I created. Cheers!
Get a short & sweet Python Trick delivered to your inbox every couple of days. No spam ever. Unsubscribe any time. Curated by the Real Python team.

Each tutorial at Real Python is created by a team of developers so that it meets our high quality standards. The team members who worked on this tutorial are:
Как настроить sublime text 3 для python
If your computer says that you don’t have Python3, you can download it from the Python website https://www.python.org/downloads/ and installed it on your computer.
Step 2: Make sure you already have Sublime Text on your computer!
At the time of this writing, the latest sublime is Sublime Text 3 you can download it from https://www.sublimetext.com and install it right away

Step 3: Let’s setting Python3 on your Sublime Text
Create a new file and save it with extension .py for example save it as checkversion.py
Go to Tools -> Build System -> Python then type on your checkversion.py
then press CTRL + B to run the code on Sublime

As you see, the version on the sublime is Python 2.7 we need to use Python 3 . Then we can set the Sublime Text to use Python3 instead of Python2. Here’s the step:
First: Check where is your Python3 path using this command
UNIX STYLE
WINDOWS STYLE
Second: Add new build system on your Sublime
Tools -> Build System -> New Build System and make sure that the new build system has this following command