[Tilecache] TileCache with 2 layers & Java Servlet (Jon)

Jon Blower jdb at mail.nerc-essc.ac.uk
Wed Jun 20 08:23:33 EDT 2007


Hi Christopher,

Yes, it's frustrating when things like this turn up.  There has been
another beta release of Jython (2.2b2) since I did this so maybe it
contains a more complete implementation of os.access() (we can but
hope).

When you release TileCache 1.9 I'll drop it into the servlet container
and see how it works.  It'll be nice to be able to drop it in without
modifying the code.

Regards,
Jon

On 6/20/07, Christopher Schmidt <crschmidt at metacarta.com> wrote:
> On Wed, Jun 20, 2007 at 08:48:03AM +0100, Jon Blower wrote:
> > if sys.platform.startswith("java"): # Detects Jython
> >    from java.io import File
> >    def canRead(path):
> >        return File(path).canRead()
> >    def canWrite(path):
> >        return File(path).canWrite()
> > else:
> >    def canRead(path):
> >        return os.access(path, os.R_OK)
> >    def canWrite(path):
> >        return os.access(path, os.W_OK)
> >
> > (Chris, perhaps these changes could be incorporated into the trunk if
> > you have time?)  Unless other things have changed in TileCache, this
> > should work.  If you try this, please let me know how you get on!
>
> Does no platform understand that os is supposed to wrap this stuff for
> you? Sigh. It seems like this same thing comes up in IronPython as
> well. Oh hey, what do you know: "(The similarity of the two approaches
> is not surprising considering that Jim Hugunin is the author of both.)"
> Grargh.
>
> I've patched TileCache to do this, though I implemented it in a
> slightly different way. I'm going to try adn get IronPython up and
> running and patch TileCache for that too, and then fix the threshold
> bug, and release a final cut of the 1.x branch as 1.9 sometime next
> week, after which I'll go ahead and start refactoring for 2.0 in a
> branch.
>
> Regards,
> --
> Christopher Schmidt
> MetaCarta
>


-- 
--------------------------------------------------------------
Dr Jon Blower              Tel: +44 118 378 5213 (direct line)
Technical Director         Tel: +44 118 378 8741 (ESSC)
Reading e-Science Centre   Fax: +44 118 378 6413
ESSC                       Email: jdb at mail.nerc-essc.ac.uk
University of Reading
3 Earley Gate
Reading RG6 6AL, UK
--------------------------------------------------------------



More information about the Tilecache mailing list