apache - Using custom module with Python CGI script -


i'm running python cgi script on localhost needs import , use python module wrote. placed cgi script in apache cgi-bin directory (i'm running on windows). i've tried placing custom module in same directory, doesn't seem able import module. prefer not have custom module cgi script called via exec().

you need put python module somewhere python's import can see it. easy ways are:

  • make directory module, , add directory pythonpath environment variable.
  • copy module python site-packages directory, under python installation directory.

in either case, need make sure module's name not same name of other module might imported python in cgi script.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -