python web 原来可以这样玩

Enable Python on IIS

Tutorial - Enable Python on IIS [ Step by step ] (techexpert.tips)

Would you like to learn how to install IIS and enable the Python CGI feature on a computer running Windows? In this tutorial, we are going to show you how to enable the Python CGI feature on the IIS server.

• Windows 2012 R2
• Windows 2016
• Windows 2019
• Python 3
• IIS

python web 原来可以这样玩_第1张图片

Perform the following configuration:

• Request Path - *.py
• Executable - C:\Python\Python38\python.exe %s %s
• Interpreter - Python Interpreter

Click on the OK button.

python web 原来可以这样玩_第2张图片

If the following message is presented, click on the Yes button. 

python web 原来可以这样玩_第3张图片 

Restart the IIS service.

Congratulations! You successfully enabled Python on the IIS server.

 python web 原来可以这样玩_第4张图片

Use the Notepad application to open the Python test page.

Replace its content with the following code.

from art import *
Art=text2art("TEST",font='block',chr_ignore=True)
print('Content-Type: text/plain')
print('')
print('This is my test!')
print(Art)

 python web 原来可以这样玩_第5张图片

你可能感兴趣的:(python,前端,开发语言)