[mod_python] Python API for doing subrequests? (was 'lookup')

Chad Whitacre chad at zetaweb.com
Sun Sep 3 19:55:50 EDT 2006


Thanks for the reply.

 > Actually, that is relatively easy. Trac ... just uses the Python
 > wrappers for Subversion to access the Subversion repository direct
 > from the file system.

Yeah, that's where I went next. I looked at both the SWIG bindings and 
pysvn. The latter appears to basically wrap the client API, and so to 
only be helpful for working copies.

 > The difficulty is only in understanding the API of the Python
 > wrappers for Subversion. For an example ...

And this is where I got stuck, yes. The example is most helpful!

The third option (besides subrequests and SWIG bindings) is to access 
the repo through HTTP/WebDAV. That's what I ended up doing in this case, 
and I kind of like it.

I ended up with a module that imports other modules directly over HTTP. 
The TCP overhead isn't too big a deal since imports usually only happen 
at startup, and you'd need to cache locally anyway (extension modules 
can only be imported from a file AFAICT). And on the plus side you've 
got a fully distributed import system.

I may explore the SWIG option more with some other applications. Thanks 
again for the comments!


More information about the Mod_python mailing list