Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to make sublime Editor run python Program

2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains "how to let the sublime editor run the python program", the content of the article is simple and clear, easy to learn and understand, now please follow the editor's train of thought slowly in depth, together to study and learn "how to let the sublime editor run python program" bar!

First install sublime and python

Sublime download address: https://www.sublimetext.com/3

Python download address: https://www.python.org/downloads/

Then according to their own operating system corresponding to download, windows uses relatively more.

The principle of direct operation is to directly call the executor of python by triggering a shortcut key or a button on the menu, which needs to bind the path of the python executable file, which can be supported in the sublime mechanism.

If you are still confused in the world of programming, you can join our Python Learning qun:784758214 to see how our predecessors learn. Exchange experiences. From basic python scripts to web development, crawlers, django, data mining, etc., zero basics to project actual combat materials have been sorted out. To every little friend of python! To share some learning methods and small details to pay attention to, click to join our python learner gathering place.

Now the steps are as follows:

Click New Build System to generate a file in the following format

This file needs to be saved, and the normal save directory is placed in

C:\ Users\ Administrator\ AppData\ Roaming\ Sublime Text 3\ Packages\ User

To facilitate the distinction, it can be renamed to python.sublime-build.

Copy the following to

{"cmd": ["C:\ Users\ Administrator\ AppData\ Local\ Programs\ Python\ Python37\ python.exe", "- u", "$file"], "file_regex": "^ [] File\" (... )\ ", line ([0-9] *)", "selector": "source.python"}

The specific python.exe location is determined according to your actual location.

Go back to the path you just arrived.

Once the settings are complete, you can run the Python file and use the shortcut key CTRL + B or click Tools-> Build in the menu bar to see the result of the execution.

Thank you for reading, the above is the content of "how to make the sublime editor run the python program". After the study of this article, I believe you have a deeper understanding of how to let the sublime editor run the python program, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report