Original Translation
1125
In addition, it is recommended that using ".py" may not be a good idea for the file extensions when used in this context (you might want to reserve ``*.py`` for support modules and use ``*.cgi`` or ``*.cgp`` for "main program" scripts).
1126
In order to set up Internet Information Services 5 to use Python for CGI processing, please see the following links:
1127
http://www.e-coli.net/pyiis_server.html (for Win2k Server) http://www.e-coli.net/pyiis.html (for Win2k pro)
1128
Configuring Apache is much simpler. In the Apache configuration file ``httpd.conf``, add the following line at the end of the file::
1129
ScriptInterpreterSource Registry
1130
Then, give your Python CGI-scripts the extension .py and put them in the cgi-bin directory.
1131
How do I keep editors from inserting tabs into my Python source?
1132
The FAQ does not recommend using tabs, and the Python style guide, :pep:`8`, recommends 4 spaces for distributed Python code; this is also the Emacs python-mode default.
1133
Under any editor, mixing tabs and spaces is a bad idea. MSVC is no different in this respect, and is easily configured to use spaces: Take :menuselection:`Tools --> Options --> Tabs`, and for file type "Default" set "Tab size" and "Indent size" to 4, and select the "Insert spaces" radio button.
1134
If you suspect mixed tabs and spaces are causing problems in leading whitespace, run Python with the :option:`-t` switch or run ``Tools/Scripts/tabnanny.py`` to check a directory tree in batch mode.