Serializing attributes and indexing
Plamen Dimitrov <[email protected]> Fri, 04 Jul 2014 22:06:11 +0300
| Newsgroups | gmane.comp.python.pyro |
|---|---|
| Message-ID | <[email protected]> |
Hi Irmen,
Thank you for your last reply - it was all I needed to know about
customer serialization and the good practice of relying on the automatic
serialization of the proxy objects themselves.
I wanted to ask you about another thing - serializing object attributes
and possibly indexing. I have problems serializing cases like
1) params = Pyro4.Proxy("some-uri-here")
params["some_present_key"]
resulting in an error of the kind "TypeError: 'Proxy' object is
unsubscriptable".
It might be an edge case so I was also wondering about a far simple case
when I need to access a simple attribute/field of a remote object:
2) firefox = Pyro4.Proxy("PYRONAME:firefox")
print firefox.download_location
where the download location is a simple string of the kind
firefox.download_location = "C:\\"
I was thinking about relying on a get() method in the first case
(params.get("some_present_key")) and properties in the second. Do you
think there is a more natural solution to this that requires less
modification of an already existing code?
Best,
Plamen
------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Pyro-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pyro-core
smime.p7s
(application/pkcs7-signature, 3.9 KB) - not displayed