~ubuntu-branches/debian/sid/pyro/sid

« back to all changes in this revision

Viewing changes to Pyro/__init__.py

  • Committer: Bazaar Package Importer
  • Author(s): Carl Chenet, Carl Chenet, Jakub Wilk
  • Date: 2010-09-14 01:04:28 UTC
  • Revision ID: james.westby@ubuntu.com-20100914010428-02r7p1rzr7jvw94z
Tags: 1:3.9.1-2
[Carl Chenet]
* revert to 3.9.1-1 package because of the development status 
  of the 4.1 package is unsuitable for stable use
  DPMT svn #8557 revision (Closes: #589172) 
* added debian/source
* added debian/source/format
* package is now 3.0 (quilt) source format
* debian/control
  - Bump Standards-Version to 3.9.1

[Jakub Wilk]
* Add ‘XS-Python-Version: >= 2.5’ to prevent bytecompilation with python2.4
  (closes: #589053).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#############################################################################
 
2
#
 
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.
 
5
#
 
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
 
9
#
 
10
#       Note: to see what Pyro version this is, print Pyro.constants.VERSION
 
11
#
 
12
#############################################################################
 
13
 
 
14
 
 
15
# Initialize Pyro Configuration.
 
16
#
 
17
# This is put here because it could actually initialize config stuff needed
 
18
# even before the code calls core.initClient or core.initServer.
 
19
#
 
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.
 
26
 
 
27
import os
 
28
import Pyro.configuration
 
29
 
 
30
config = Pyro.configuration.Config()
 
31
try:
 
32
        confFile = os.environ['PYRO_CONFIG_FILE']
 
33
except KeyError:
 
34
        confFile = ''
 
35
if not confFile and os.path.isfile('Pyro.conf'):
 
36
        confFile='Pyro.conf'
 
37
config.setup(confFile)