In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly explains "how to let IIS7.5 execute Python script". The content of the article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "how to let IIS7.5 execute Python script".
[detailed steps]:
1. Download the windows version of the installer from python (click to enter). Since the operating system is x64, I choose python 2.7.11 x64 installer ~
two。 Installation, it is recommended not to install to the system disk, so as to avoid redoing the system and installing it again.
3. Iis7.5- > isapi and cgi restrictions-> right add-> isapi or cgi path Select python.exe% s% s under the python folder; enter python in the description.
4.iis 7.5-> Handler Mapping-> add script Mapping-> request path: * .py
-> executable: select the file path of the python installation and select python.exe% s% s
-> name: python
5. Add a new application pool-> name is python, no managed code
6. Create a new web application: default site-> right add application-> alias tesstpy, application pool select python, physical path such as: d:\ python\ test, OK.
Now that the deployment is complete, let's test the effect and set up index.py under d:\ python\ test:
1. Click Handler Mapping in the root directory of iis.
two。 After entering Handler Mapping, right-select add script Mapping.
3. Add python interpreter, pay attention to format and path.
Or as shown in the following figure
If the error message "there must be isapimodule or cgimodule in the module list" appears after determination, it is caused by the lack of cgi and isapi extension capabilities in iis. You can open the control panel → programs and functions → turns the windows function on or off, choose to install the relevant features in the pop-up "window Features" window, and then add the script mapping again. As shown in the following figure:
4. Create a new python file, as shown in the following figure, assuming you put it under "d:\ pythonweb\".
Print ("status: 200ok") print ("content-type: text/html") print () # prints a blank line to separate the http header from the body print ("hello world!")
5. Create a new website, as shown below
6. Enter the address to view, http://localhost:8099/2.py.
Thank you for your reading, the above is the content of "how to let IIS7.5 execute Python script". After the study of this article, I believe you have a deeper understanding of how to let IIS7.5 execute Python script, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.