Importing python modules with Apache -


i trying python cgi script working on apache 2.2.

i have reporting.cgi in cgi-bin , working fine.

import sys import os import clr import pypyodbc import cgi.  # html header print '<html>' print '<head>' print '<link rel="stylesheet" href="../html_docs/epydoc.css" type="text/css" />' print '<meta http-equiv="content-type"  content="text/html; charset=utf-8" />' print '<title>test framework</title>' print '</head>' .. ... .. 

however, there's other python modules need use on network drive. (genutils.py)

so try import location , import genutils.py.

sys.path.insert(0, 'i:/swd/shared/python') import genutils 

however, when try call webpage get

[mon oct 07 14:02:25 2013] [error] [client 10.70.26.3]   file "c:/program files (x86)/apache software foundation/apache2.2/cgi-bin/reporting.cgi", line 23, in <module>\r\r [mon oct 07 14:02:25 2013] [error] [client 10.70.26.3] importerror: no module named genutils. 

i've sys.path.append , not using drive letters (//machine/dir/swd/shared/python)

any advice appreciated.

thanks.


Comments

Popular posts from this blog

java.util.scanner - How to read and add only numbers to array from a text file -

rewrite - Trouble with Wordpress multiple custom querystrings -