This article brings you the detailed process (pictures and text) of how notepad runs python. 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
Recommended tutorial:1 Display 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.
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 .
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.
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" buttonAs shown below Change this place.
The effect is as follows:
5Configure debugging tools
cmd /k python "$(FULL_CURRENT_PATH)" & ECHO. & PAUSE & EXIT
7Run the python program
The above is the detailed content of How to run python program in notepad. For more information, please follow other related articles on the PHP Chinese website!