Transferred from: http://www.xuebuyuan.com/1102224.html
This problem has been bothering me for a long time, Python is very sensitive to indentation, generally recommended indentation with a space, and notepad++ automatic indentation is used by the Tab,google, Baidu, are mentioned in the preferences there is a tab with 4 spaces instead of options, but I have been unable to find this option, After the n version of the update is still the same, and even downloaded some plugins want to solve, but no results.
I finally found the answer in the Help document today (helping is important!!!). ), the special record of the time and forget the day.
If you want to turn on auto indent, you can set it in Settings-"preferences-"
After checking this, you will automatically indent the line, and set the tab change to 4 spaces.
Settings-"preferences-" language-"tag settings
Do not change "default", now do very flexible, can be set in different languages, we can choose Pyhton, will be removed by default, select "Replace with space"
Now your notepad++ can edit the Pyhton file very well.
Just talk about running settings, enter cmd/k C:\Python26\python.exe "$ (full_current_path)" in Run (F5) & PAUSE & EXIT, click Save, name it yourself, later in "Run" You can run your Python program under the menu .
notepad++ editing automatic indentation of Pyhton files (graphic)