I have run into a rather unique situation. I need to deploy a web application that uses Python CGI on a DVD. No software can be downloaded onto the computer of the user.

Does anyone have any ideas for how this can be accomplished?


Python is a script language and requires an interpreter to run. However, not all is lost. You can make an executable from a Python script. It is not clear if this works for CGI. I expect you will have to modify your code since CGIs are meant to run within a web environment. Here are a few links:

http://effbot.org/pyfaq/how-do-i-make-a-python-script-executable-on-unix.htm and http://www.logix4u.net/component/content/article/27-tutorials/44-how-to-create-windows-executable-exe-from-python-script look good. But I would be remiss if I did not use a stackoverflow link so here it is - https://stackoverflow.com/questions/17276296/how-to-make-others-use-my-python-script/17276712#17276712.

This link may help too: http://pointlessprogramming.wordpress.com/2011/02/13/python-cgi-tutorial-1/

You are going to have to experiment around a bit. I did something similar years ago but with a different language taking HTML files and producing an active CD.

| improve this answer | |
  • The web application makes AJAX calls to the python script. Could I do that if they are .exes? – adeora Feb 23 '14 at 17:55
  • I would think so. I cannot see why not. OF course I could be wrong. However, honestly speaking, my experience is not strong enough (recently) to get into the details with too much certainty. I did my active CD about 15 years ago. Where did the time go?? I do web CGI apps and data automation almost daily. I have not worked with AJAX except to determine how I will eventually use it in my own work (doing the big stuff before the little stuff). This was JavaScript, Java, and Perl. Not Python. – closetnoc Feb 23 '14 at 19:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.