<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>
dear all,<BR>
<BR>
I am trying to run turbogears application using Apache on windows and the start_prj.py is <BR>
<BR>
from os.path import *<BR>import sys<BR>
#if len(sys.argv) > 1:<BR># update_config(configfile=sys.argv[1], modulename="wiki30.config")<BR>
sys.argv[0]="d:/web/Wiki-30"<BR>sys.argv[1]="d:/web/Wiki-30/dev.conf"<BR>
if exists(join(dirname(__file__), "setup.py")):<BR> cherrypy.config.update(file=join(dirname(__file__),"d:/web/Wiki-30/dev.cfg"))<BR>else:<BR> cherrypy.config.update(file=join(dirname(__file__),"d:/web/Wiki-30/prod.cfg"))<BR>
<BR>from wiki30.controllers import Root<BR>cherrypy.root =Root()<BR>if __name__ == "__main__":<BR> cherrypy.server.start()<BR>
def mp_setup():<BR> pass<BR>
if __name__!="__main__":<BR> #ie imported this from apache<BR> import kid <BR> kid.path.insert(dirname(__file__))<BR> #or:<BR> #kid.path.insert("D:\\") # or whatever<BR>=====================================================<BR>
The Apache httpd.conf settings are like this:<BR>
<VirtualHost *:80><BR> ServerName 'localhost'<BR> PythonPath "['D:/web/wiki-30/'] +sys.path"<BR> <Location "/"><BR> SetHandler mod_python<BR> PythonHandler mpcp<BR> PythonOption cherrysetup startwiki30::mp_setup<BR> </Location><BR></VirtualHost><BR>
and when I am trying to access the page from <A href="http://localhost">http://localhost</A><BR>
it is giving <FONT size=2><BR>
PythonHandler mpcp: AttributeError: 'module' object has no attribute 'argv'<BR>
<BR>
pls help to come out of this.<BR>
Thanks<BR>
Shiv Kumar<BR></FONT><br /><hr />The idiot box is no longer passe; <a href='http://content.msn.co.in/Entertainment/TV/Default.aspx' target='_new'>It's making news and how!</a></body>
</html>