IIS connecting to Python through CGI
You must have Python already installed in your system.
Open Internet Information Services (IIS) Manager
In left panel go to defalut web site
At center panel check for Handler Mappings
At right panel check for Add Script Map
Search for python.exe in your PC
Enter the details as per the above picture. You can browse your PC and select the python.exe in your system.
Go to root of your localhost and create test.py file with this code
print("HTTP/1.0 200 OK\n")
print('Hello World')
Output
Hello World
You can import library
print("HTTP/1.0 200 OK\n")
import math
print(math.pi)
This article is written by plus2net.com team.
plus2net.com