Ok  - I got tilecache working under mod_wsgi 3.0 under apache 2.2.14 on windows 2003 server.<div><br></div><div>I ended up downloading paste and adding it explicitly to sys.path at the beginning of Service.py and it all clicked into place.</div>

<div><br></div><div>Thank you very much manel for your tilecache.wsgi script - it was the thing I needed the most and would have been hard pressed to create myself easily (I don&#39;t know any python :) )</div><div><br></div>

<div>Kind regards again from Iceland,</div><div>Gissur Þórhallson</div><div><br></div><div><br><div class="gmail_quote">2010/1/28 Gissur Þórhallsson <span dir="ltr">&lt;<a href="mailto:gissur@loftmyndir.is">gissur@loftmyndir.is</a>&gt;</span><br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Thank you both for your pointers. They were most helpful - at least I&#39;m getting errors from python now :)<div><br>

</div><div>I&#39;m a bit confused thought - it&#39;s complaining that it can&#39;t find paste, which is understandable, since paste is not installed.</div>
<div>Do I need paste if I&#39;m running under mod_wsgi? I was under the impression  that it was only required for wsgi standalone...</div><div class="im"><div><br>Kind regards from Iceland,</div><div>Gissur</div></div><div>

<div></div><div class="h5"><div><br><div class="gmail_quote">
On Thu, Jan 28, 2010 at 10:05 AM,  <span dir="ltr">&lt;<a href="mailto:manel.clos@ajgirona.cat" target="_blank">manel.clos@ajgirona.cat</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">






<div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">Hi Gissur,</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">Here is the tilecache.wsgi script I&#39;m 
using:</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"># In Apache2&#39;s config:<br>#  WSGIScriptAlias 
/tilecache /data/tilecache/tilecache.wsgi</font></span></div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">import os, sys<br>tilecachepath, wsgi_file = 
os.path.split(__file__)<br>if not tilecachepath in 
sys.path:<br>    
sys.path.append(tilecachepath)</font></span></div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">from TileCache.Service import Service, 
wsgiHandler</font></span></div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">cfgfiles = (os.path.join(tilecachepath, 
&quot;tilecache.cfg&quot;))</font></span></div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">theService = {}<br>def wsgiApp (environ, 
start_response):<br>    global theService</font></span></div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">    cfgs  = 
cfgfiles<br>    if not 
theService:<br>        theService = 
Service.load(cfgs)<br>    return wsgiHandler(environ, 
start_response, theService)</font></span></div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">application = wsgiApp</font></span></div>
<div><font face="Arial" color="#0000ff" size="2"></font> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">The script assumes to be in the tilecache dir, along the 
tilecache.cfg file.</font></span></div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font face="Arial" color="#0000ff" size="2">Hope this helps.</font></span></div><br>
<div lang="es" dir="ltr" align="left">
<hr>
<font face="Tahoma" size="2"><b>De:</b> <a href="mailto:tilecache-bounces@openlayers.org" target="_blank">tilecache-bounces@openlayers.org</a> 
[mailto:<a href="mailto:tilecache-bounces@openlayers.org" target="_blank">tilecache-bounces@openlayers.org</a>] <b>En nombre de </b>Gissur 
Þórhallsson<br><b>Enviado el:</b> jueves, 28 de enero de 2010 
4:30<br><b>Para:</b> <a href="mailto:tilecache@openlayers.org" target="_blank">tilecache@openlayers.org</a><br><b>Asunto:</b> [Tilecache] 
Tilecache under mod_wsgi<br></font><br></div><div><div></div><div>
<div></div>Hello,
<div><br></div>
<div>I&#39;m setting up a tilecache instance and wanted to try using 
mod_wsgi. </div>
<div>The thing is that I&#39;m running python 2.6 and have other things that depend 
on that version of python otherwise I&#39;d just use mod_python.</div>
<div><br></div>
<div>I&#39;ve got apache 2.2 running on a windows 2003 server already - and mod_wsgi 
up and running. I just have no idea how to plug tilecache into that.</div>
<div><br></div>
<div>Has anybody had any experience running tilecache under mod_wsgi? Any 
pointers?</div>
<div><br></div>
<div>Kind regards from Iceland,</div>
<div>Gissur Þórhallsson</div>
<div><br></div></div></div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>