Home >Development Tools >notepad >Detailed process of configuring Python environment in NotePad++ (picture and text)

Detailed process of configuring Python environment in NotePad++ (picture and text)

不言
不言Original
2018-09-26 16:43:0115552browse

This article brings you the detailed process (pictures and texts) of configuring the Python environment on NotePad. It has certain reference value. Friends in need can refer to it. I hope it will be helpful to you.

##notepad download address:

//m.sbmmt.com/xiazai/gongju/92

1Display spaces and indicators


Why is this recommended? Because judging whether Python statements are at the same level mainly depends on indentation. The most feared thing in Python programs is the mixed use of spaces and tabs, which causes errors that are sometimes difficult to find. Especially when we download some source code from the Internet, there are always running problems. After the circled part in the picture below is checked, in NotePad, the space will be represented as "." and the Tab key will be represented as "→", which is easy to identify and very convenient.

2 Automatic line wrapping

After this is checked, if the code is very long, it will automatically Give you a line break so you don't have to drag the slider to see .

3 Configure tab characters

It is strongly recommended to replace this tab symbol with spaces (4), completely Solve the problem of mixing spaces and tabs.

Notepad ->"Settings" menu->"Preferences" button->"Language" button

As shown below Change the place.

4Autocomplete

It is recommended to check these places so that you can use NotePad The editor can automatically help you complete other parts.

##Notepad ->"Settings" menu->"Preferences" button->"AutoComplete" button

As shown below Change this place.

The effect is as follows:

5Configure debugging tools

  1. Notepad ->"Run" menu->"Run" button

  2. ## Enter the following command in the pop-up window:
  3. cmd /k python "$(FULL_CURRENT_PATH)" & ECHO. & PAUSE & EXIT

    Then click "Save" and choose a name at will, such as "RunPython". For convenience, configure the shortcut keys (such as Ctrl R), click OK. Afterwards, to run the Python file, just press the configured shortcut key or click "RunPython" on the run menu.
Note: A prerequisite for normal operation here is that Python has been added to the environment variable, that is, entering Python in cmd can parse the command normally.

6python configuration environment variable configuration diagram:

7Run the python program

The above is the detailed content of Detailed process of configuring Python environment in NotePad++ (picture and text). For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn