<html>
<head>
<style>
P
{
margin:0px;
padding:0px
}
body
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body>
dear all,<BR>
&nbsp;<BR>
I am trying to run turbogears application using Apache on windows and the start_prj.py is <BR>
&nbsp;<BR>
from os.path import *<BR>import sys<BR>
#if len(sys.argv) &gt; 1:<BR>#&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp; cherrypy.config.update(file=join(dirname(__file__),"d:/web/Wiki-30/dev.cfg"))<BR>else:<BR>&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp; cherrypy.server.start()<BR>
def mp_setup():<BR>&nbsp;&nbsp; pass<BR>
if __name__!="__main__":<BR>&nbsp;&nbsp;&nbsp; #ie imported this from apache<BR>&nbsp;&nbsp;&nbsp; import kid <BR>&nbsp;&nbsp;&nbsp; kid.path.insert(dirname(__file__))<BR>&nbsp;&nbsp;&nbsp; #or:<BR>&nbsp;&nbsp;&nbsp; #kid.path.insert("D:\\") # or whatever<BR>=====================================================<BR>
The Apache httpd.conf settings are like this:<BR>
&lt;VirtualHost *:80&gt;<BR>&nbsp;ServerName 'localhost'<BR>&nbsp;PythonPath "['D:/web/wiki-30/'] +sys.path"<BR>&nbsp;&lt;Location "/"&gt;<BR>&nbsp;&nbsp;SetHandler mod_python<BR>&nbsp;&nbsp;PythonHandler mpcp<BR>&nbsp;&nbsp;PythonOption cherrysetup startwiki30::mp_setup<BR>&nbsp;&lt;/Location&gt;<BR>&lt;/VirtualHost&gt;<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>
&nbsp;<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>