#! in Linux After/usr/bin/python, the following code is executed as a program. But in Windows with idle programming words are all behind the comments, and then the code is treated as text. How can we solve this problem?

Source: Internet
Author: User

This article turns from: Http://bbs.csdn.net/topics/392027744?locationNum=6&fps=1 This problem is the big God disdain solution, small white and completely do not understand the question ... With this problem, on-line how can not find a solution, their own study of the half-day finally can use my solution to send up hope for the future Learning Python programming This book of people have help it (a large part of their own understanding, there is the wrong place to be enthusiastic about the great God criticized. Note: I use the WIN10 system, Linux has not tried to implement the display page rather than the code, the first to open the Internet service on your computer, is at least able to access your computer hard disk files through a browser (make your computer a Web server!! This should be the basis for Python CGI programming, and many of the basic threads of Python CGI programming do not tell you why, directly you configure apache!! Those who say configure the httpd.conf file also want to install apache!! first Httpd.conf in the Conf folder of Apache Unpack package!! At first I thought it was a C-drive configuration file!! I've been looking for half an hour!! Hours!! Hours!! When!!. Mom, the egg is not friendly to my rookie. So first make sure the computer is installed apache!! 1. Install Apache (Baidu has a lot of installation tutorials) (do not download the source code, download the compiled compression package!!) Baidu is a bit of a python CGI problem note:1. It has various versions and requires support from different versions of VC libraries, so make sure that the computer has the appropriate virtual studio software installed. I downloaded the latest version of Apache, in order to support the download and install the vs2017note:2 of the day. This thing installation is still more annoying, if the configuration is not even the wrong installation times will appear in the service called Apache service, but can not be used! So to remove this service in the registry and restart the installation!! Specifically can Baidu, I installed the restart no less than 4 5 times ... A few points to note: Xhttpd.conf inside a lot of configuration can be changed after installation, but there are several parameters must be set in advance!! [i] Keywords: serverroot "C:/apache24" This is the Apache installation directory, according to their actual situation (extract to where to write what) fill in the attention of the location of the slash direction!! Do not paste directly!! Do not paste directly!! Do not paste directly!! Important thing to say three times!! window under the default path with the \, here is the Linux under the/!! Key words: DocumentRoot "C:/apache24/htdocs" This isThe root directory of the site, you can modify, here I changed to "H:/web". Keywords:

#! in Linux After/usr/bin/python, the following code is executed as a program. But in Windows with idle programming words are all behind the comments, and then the code is treated as text. How can we solve this problem?

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.