dear all,
I am trying to run turbogears application using Apache on windows and the
start_prj.py is
from os.path import *import sys
#if len(sys.argv) > 1:# update_config(configfile=sys.argv[1],
modulename="wiki30.config")
sys.argv[0]="d:/web/Wiki-30"sys.argv[1]="d:/web/Wiki-30/dev.conf"
if exists(join(dirname(__file__), "setup.py")):
cherrypy.config.update(file=join(dirname(__file__),"d:/web/Wiki-30/dev.cfg"))else:
cherrypy.config.update(file=join(dirname(__file__),"d:/web/Wiki-30/prod.cfg"))
from wiki30.controllers import Rootcherrypy.root =Root()if __name__ ==
"__main__": cherrypy.server.start()
def mp_setup(): pass
if __name__!="__main__": #ie imported this from apache import kid
kid.path.insert(dirname(__file__)) #or: #kid.path.insert("D:\\") # or
whatever=====================================================
The Apache httpd.conf settings are like this:
<VirtualHost *:80> ServerName 'localhost' PythonPath "['D:/web/wiki-30/']
+sys.path" <Location "/"> SetHandler mod_python PythonHandler mpcp
PythonOption cherrysetup startwiki30::mp_setup </Location></VirtualHost>
and when I am trying to access the page from http://localhost
it is giving
PythonHandler mpcp: AttributeError: 'module' object has no attribute 'argv'
pls help to come out of this.
Thanks
Shiv Kumar
_________________________________________________________________
The idiot box is no longer passe!
http://content.msn.co.in/Entertainment/TV/Default.aspx
_______________________________________________
Tutor maillist - Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor