[Tutor] PythonHandler mpcp: AttributeError: 'module' object has no attribute 'argv'

ShivKumar Anand shiv_mbm at hotmail.com
Sat May 19 19:53:53 CEST 2007

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")
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.
Shiv Kumar
The idiot box is no longer passe!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/tutor/attachments/20070519/a053cc4d/attachment.html 

More information about the Tutor mailing list