File: server.py

package info (click to toggle)
pyro 1%3A3.14-5
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 2,048 kB
  • ctags: 1,988
  • sloc: python: 11,194; xml: 128; sh: 52; makefile: 28
file content (18 lines) | stat: -rw-r--r-- 501 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python

import sys
from Pyro.ext import remote
import object

# if you don't like the objects to be registered in the Default namespace
# uncomment the following two lines, and use the 'nsc' tool to create
# the appropriate name group:
# import Pyro
# Pyro.config.PYRO_NS_DEFAULTGROUP=":mygroup"

print 'Providing local object as "quickstart"...'
remote.provide_local_object(object.myObject(), 'quickstart')

print 'Waiting for requests.'
sys.exit(remote.handle_requests(wait_time=2))