[mod_python] SimpleXMLRPCServer causing seg fault?

Graham Dumpleton grahamd at dscpl.com.au
Fri May 13 03:22:26 EDT 2005


Michael wrote ..
> xmlrpclib causes the same problem. Does mod python have issues with 
> threading or forking or anything like that which I need to take into 
> account?

Threading/forking shouldn't be an issue. Still think it would be a shared
library versioning issue.

All I can suggest is you look at what "xmlrpclib" module imports and then
import them explicitly and slowly drop each import out until you find
the culprit. Keep doing this recursively as needs be.

> The
> main feature I like about it is that if you access the server with a 
> normal web browser you can browse the code's documentation. No idea if
> Vampire and other xmlrpc module do that too. I really don't need 
> anything fancy other than that though.

Depends on what you mean by documentatin. Ie., automatically generated
from introspection or simply a HTML page. Because in Vampire the handlers
are resource based, you could have the base handler with no extension
be the XML-RPC service and the same name with ".html" extension refer
to documentation. This HTML page could be static or you could write
Python code to generate it by introspection of same object that was published
as XML-RPC service if desired. In other words, the infrastucture is there
to do it.

> For a different project, I do need a lightweight XML-RPC service that 
> can run without Apache but I am thinking of trying Twisted for that.

I'm not sure I would call Twisted lightweight. :-)

> >Using Vampire's mechanism is better than SimpleXMLRPCServer as it
> >optionally allows you to access the original mod_python "req" object if
> >you need to:
> >  
> >
> To what purpose?

Blocking access based on originating client IP address or making use of
additional path info supplied in request URL as adjunct to selection
mechanism to determine what data request should be applied to. Could
also be used for logging stuff in log files with details marked up against
the specific URL which was used.

Graham


More information about the Mod_python mailing list