python cgi on IIS

How do you set up IIS so that you can call python scripts from asp pages?

Ok, so I found the answer to that question here: http://support.microsoft.com/kb/276494

So on to my next question: How do you call a cgi script from within classic asp (vb) code? Particularly one which is not in the web root directory.


Asked by: Vanessa812 | Posted: 05-10-2021






Answer 1

You could also do it this way.

Answered by: Roland747 | Posted: 06-11-2021



Answer 2

I don't believe that VBScript as hosted by IIS has any way of executing an external process. If you are using python as an AXscripting engine then you could just use the sys module. If the script you're calling is actually meant to be a cgi script you'll have to mimic all the environment variables that the cgi uses. The alternative is to put the script on the python path, import it and hope that it is modular enough that you can call the pieces you need and bypass the cgi handling code.

Answered by: Grace859 | Posted: 06-11-2021



Similar questions

CGI with Python

I'm beginning to use CGI with Python. After running the following piece of code: #!c:\python34\python.exe import cgi print("Content-type: text/html\n\n") #important def getData(): formData = cgi.FieldStorage() InputUN = formData.getvalue('username') InputPC = formData.getvalue('passcode') TF = open("TempFile.txt", "w") TF.write(InputUN) TF.write(InputPC) TF.close() ...


Python CGI with API

I am quite new to python, I have built some applications in python with CGI and I found cgi is much easier compare to a framework as i have full control on everything. Tried to build a web api through below module but it end up with a web page rather than an api. Import cgi Import cgitb I would like to create a web api, as I am familiar with cgi i would like to create it (web api) through python cgi,I have been loo...


python - What's the best Django search app?


How can I use a DLL file from Python?

What is the easiest way to use a DLL file from within Python? Specifically, how can this be done without writing any additional wrapper C++ code to expose the functionality to Python? Native Python functionality is strongly preferred over using a third-party library.


python - PubSub lib for c#

Is there a c# library which provides similar functionality to the Python PubSub library? I think it's kind of an Observer Pattern which allows me to subscribe for messages of a given topic instead of using events.


python - What is the best way to copy a list?

This question already has answers here:


python - Possible Google Riddle?

My friend was given this free google website optimizer tshirt and came to me to try and figure out what the front logo meant. t-shirt So, I have a couple of guesses as to what it means, but I was just wondering if there is something more. My first guess is that eac...


How do you check whether a python method is bound or not?

Given a reference to a method, is there a way to check whether the method is bound to an object or not? Can you also access the instance that it's bound to?


ssh - How to scp in Python?

What's the most pythonic way to scp a file in Python? The only route I'm aware of is os.system('scp "%s" "%s:%s"' % (localfile, remotehost, remotefile) ) which is a hack, and which doesn't work outside Linux-like systems, and which needs help from the Pexpect module to avoid password prompts unless you already have passwordless SSH set up to the remote host. I'm aware of Twisted'...


python - How do I create a new signal in pygtk

I've created a python object, but I want to send signals on it. I made it inherit from gobject.GObject, but there doesn't seem to be any way to create a new signal on my object.


python - What do I need to import to gain access to my models?

I'd like to run a script to populate my database. I'd like to access it through the Django database API. The only problem is that I don't know what I would need to import to gain access to this. How can this be achieved?


python - How do I edit and delete data in Django?

I am using django 1.0 and I have created my models using the example in the Django book. I am able to perform the basic function of adding data; now I need a way of retrieving that data, loading it into a form (change_form?! or something), EDIT it and save it back to the DB. Secondly how do I DELETE the data that's in the DB? i.e. search, select and then delete! Please show me an example of the code ...






Still can't find your answer? Check out these communities...



PySlackers | Full Stack Python | NHS Python | Pythonist Cafe | Hacker Earth | Discord Python



top