1
#############################################################################
3
# $Id: __init__.py,v 2.10.2.1 2008/05/17 09:56:01 irmen Exp $
4
# Pyro file to make Pyro a package, and to set up configuration.
6
# This is part of "Pyro" - Python Remote Objects
7
# Which is (c) Irmen de Jong - irmen@users.sourceforge.net
8
# More information on Pyro's website: http://pyro.sourceforge.net
10
# Note: to see what Pyro version this is, print Pyro.constants.VERSION
12
#############################################################################
15
# Initialize Pyro Configuration.
17
# This is put here because it could actually initialize config stuff needed
18
# even before the code calls core.initClient or core.initServer.
20
# Pyro.config is a class, which has a __getattr__ member, so all
21
# pyro code can use Pyro.config.<itemname> to look up a value.
22
# This allows for tweaking the configuration lookups by writing
23
# a custom __getattr__ and/or __init__ for the class.
24
# However, currently the class initializer adds configuration items
25
# as regular class data members.
28
import Pyro.configuration
30
config = Pyro.configuration.Config()
32
confFile = os.environ['PYRO_CONFIG_FILE']
35
if not confFile and os.path.isfile('Pyro.conf'):
37
config.setup(confFile)