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

« back to all changes in this revision

Viewing changes to examples/exceptions/server.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
 
import Pyro
2
 
import excep
3
 
 
4
 
ns=Pyro.naming.locateNS()
5
 
daemon=Pyro.core.Daemon()
6
 
obj=excep.TestClass()
7
 
uri=daemon.register(obj)
8
 
ns.remove("example.exceptions")
9
 
ns.register("example.exceptions", uri)
10
 
print "Server started."
11
 
daemon.requestLoop()
 
1
#!/usr/bin/env python
 
2
import sys,os
 
3
 
 
4
sys.path.insert(0,os.pardir)            # to find testserver.py
 
5
 
 
6
import testserver
 
7
 
 
8
import Pyro.core
 
9
import excep
 
10
 
 
11
######## testclass object
 
12
 
 
13
class testclass(Pyro.core.ObjBase, excep.testclass):
 
14
        def __init__(self):
 
15
                Pyro.core.ObjBase.__init__(self)
 
16
 
 
17
######## main program
 
18
 
 
19
testserver.start(testclass, 'exceptions')