File: client.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-- 617 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import Pyro.core
import Pyro.util

if not Pyro.config.PYRO_MOBILE_CODE:
	print "\nWARNING: PYRO_MOBILE_CODE not enabled\n"
if Pyro.config.PYRO_XML_PICKLE=='gnosis' and Pyro.config.PYRO_GNOSIS_PARANOIA>=0:
	print "\nWARNING: Using gnosis xml pickle but PYRO_GNOSIS_PARANOIA needs to be -1\n"


HOST="localhost"
URI = "PYROLOC://%s/testmobile.server2client"

HOST=raw_input("server host (empty for %s): " % HOST) or HOST	
obj=Pyro.core.getProxyForURI(URI % HOST)
result=obj.method("some name")   # this will be an 'unknown' object type !
print "result of calling remote object: ",result
print "name was: ",result.name