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

Python Automation Test Development tool sublime Environment Construction

2025-01-17 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

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

Baidu search: Xiaoqiang Test Brand

Feel that the article is good, remember to forward it.

Introduction

It is very important to have an easy-to-use ide with code. Some people always despise tools. I think it is totally wrong. In fact, the tool itself is not wrong, it is the person who uses the tool, so please do not despise the tool, otherwise please do not use the computer. Because computers are also tools!

Well, back to the point, python code we often use pycharm,eclipse and so on, these tools are too bulky, resource consumption is too large, the use is not comfortable, in fact, small and easy to use is the king.

I have previously introduced a python authoring tool called ulipad, which you can check out on my blog http://xqtesting.blog.51cto.com if you are interested. Today we introduce another tool: sublime 3

Download and install

There are many online tutorials. But basically are copy, this installation for the author's personal practice, suitable for the latest version of sublime 3. The required installation packages and plug-ins can be obtained by replying to sub after following the Wechat official account [Test help Diary].

1 install sublime 3

Sublime 3 can be downloaded and installed directly. When installing, check Add to explorer context menu so that Sublime Text can be added to the right-click file and can be opened directly using Sublime Text when you right-click the file. Then set it, as shown in the figure

If you want to customize the path of python, select build system > new build system, enter the following, and change the path to your own actual path.

{

"cmd": ["D:/Python34/python.exe", "- u", "$file"]

"file_regex": "^ [] * File\" (... *?)\ ", line ([0-9] *)"

"selector": "source.python"

"env": {"PYTHONIOENCODING": "utf-8"}

}

You can choose after saving.

2 install Package Control

There are many installation methods on the Internet, but most of them don't work, and I don't know why. So here to tell you the way of manual installation, the simplest success rate is also high.

First of all, download the plug-in and get the method mentioned above. For the remaining steps, please look at the picture carefully.

Put the plug-in in the directory above, and then restart sublime to complete the installation. You can see it at the following location

Plug-in installation related to python

Let's start with a few plug-ins:

SublimeCodeIntel: code hint plug-in (required)

SideBarEnhancements: expands the number of menu options in the sidebar to improve your productivity (required)

SublimeTmpl: create a new file template plug-in (required)

AutoPep8:python development specification pep8

Anaconda: automatic keyword matching and other practical functions to effectively improve development efficiency (required)

SublimeREPL: run the current file directly, which is convenient for debugging (must be installed, and then press ctrl+b to run it)

All plug-ins are installed in the same way, so here only a few are selected for explanation!

The plug-in sublimecodeintel is installed as follows:

1 Select Preferences > Package Control in sublime

2 enter install to select the associated install package

3 enter sublimecodeintel, and then select install

4 after the installation is complete, you can see the installed plug-ins in Preferences > Package Settings

After the plug-in SideBarEnhancements is installed, you need to re-select your working directory to display, as follows (if you can't see it, please set it in view > side bar)

After the plug-in SublimeTmpl is installed, select key bindings-user under Preferences > Package Settings to set it as follows (meaning that you can quickly create a python file by pressing ctrl+alt+p)

[

{

"caption": "Tmpl: Create python", "command": "sublime_tmpl"

"keys": ["ctrl+alt+p"], "args": {"type": "python"}

}

]

After the plug-in Anaconda is installed, you need to configure it in two places, as follows:

The first place

Find "python_interpreter": "C:/Python33/python.exe". The following is your actual python address. If you don't specify it, you won't be able to run the code.

The second place

Is the settings-user in the image above. Enter the following and save it

{

"python_interpreter": "C:/Python33/python.exe", / / location where the system installs Python

"anaconda_linting": false

"swallow_startup_errors": true

}

Summary

Now that the environment has been built, you are free to play python! Welcome to the group discussion 229390571.

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

Internet Technology

Wechat

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

12
Report