File: client.py

package info (click to toggle)
pyro5 5.16-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,124 kB
  • sloc: python: 14,328; makefile: 161; sh: 66; javascript: 62
file content (19 lines) | stat: -rw-r--r-- 466 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import Pyro5.api


uri = input("enter factory server object uri: ").strip()
factory = Pyro5.api.Proxy(uri)

# create several things.
print("Creating things.")
thing1 = factory.createSomething(1)
thing2 = factory.createSomething(2)
thing3 = factory.createSomething(3)

print(repr(thing1))

# interact with them on the server.
print("Speaking stuff (see output on server).")
thing1.speak("I am the first")
thing2.speak("I am second")
thing3.speak("I am last then...")