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

« back to all changes in this revision

Viewing changes to examples/circle/servC.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
#!/usr/bin/env python
 
2
import Pyro.naming
 
3
import Pyro.core
 
4
import chain
 
5
from Pyro.errors import PyroError,NamingError
 
6
 
 
7
Pyro.core.initServer()
 
8
 
 
9
daemon = Pyro.core.Daemon()
 
10
ns = Pyro.naming.NameServerLocator().getNS()
 
11
try:
 
12
    ns.createGroup(":test")
 
13
except NamingError:
 
14
    pass
 
15
daemon.useNameServer(ns)
 
16
 
 
17
objName='C'
 
18
nextName='A'
 
19
 
 
20
daemon.connect(chain.Chain(objName,nextName),':test.chain_'+objName)
 
21
 
 
22
# enter the service loop.
 
23
print 'Server started obj',objName
 
24
daemon.requestLoop()
 
25