Appache configuration for Python in Windows

For professionals and Freshers

Step1 : open httdp.config file present in  appache conf folder.

Step 2: uncomment    below line and append .py
example : original entry 
             # AddHandler cgi-script .cgi

after uncomments it looks like
          AddHandler cgi-script .cgi .py

save changes.

Step3 : create one index.py file in htdocs folder 

index.py

#!C:\Users\Govind\AppData\Local\Programs\Python\Python36\python
print ("Content-Type:  text/html")
print  ("")
print  ("helloooooooooooooooooooooo")



 
Note : first line is the path of python exe , my installation path  is
C:\Users\Govind\AppData\Local\Programs\Python\Python36\python
u ca give urs

open web browser and type localhost/index.py and see result
 







Comments

Popular posts from this blog

Filter In Javafx

Kotlin with StandAlone Complier