[Zope3-Users] how to know which port zope is runnning on?

Chris Withers chris at simplistix.co.uk
Thu Nov 30 05:10:29 EST 2006

Shailesh Kumar wrote:
> I have 2 different zope applications running (on different machines) and
> they would be talking to each other, one is a master application and there
> may be multiple instances of the other one (on different machines). I need
> the port number information for registing one with another 
> programmatically.
> don't want to fix port numbers for them.

Well, I'd be looking to dig into the config info provided by zope.conf.

In Zope 2, this is done with:

from App.config import getConfiguration
config = getConfiguration()

...Zope 3 likely has something similar.

> couldn't figure out how it can be accessible). Probably I can get it by
> parsing zope.conf again in my code.

Don't do that, it would be silly ;-)


Simplistix - Content Management, Zope & Python Consulting
            - http://www.simplistix.co.uk

More information about the Zope3-users mailing list