1. Introduction
Pyro is an acronym for PYthon Remote Objects. It is a basic Distributed Object
Technology system written entirely in Python. It resembles Java's Remote Method Invocation (RMI).
It is less similar to CORBA - which is a system and language independent Distributed Object Technology
and has much more to offer than Pyro or RMI.
But Pyro is small, simple and free!
For another overview of what Pyro is, see the Pyro page online
(http://pyro.sourceforge.net/). You can also download the package from there.
Copyright and Disclaimer
This software is copyright © by Irmen de Jong. It is subject to change without notice.
Pyro comes as-is, without warranty and in no event can Irmen de Jong be held liable
for any problems resulting from this software.
License: Pyro is released under the MIT license, see the file "LICENSE".
To get an idea of how Pyro works, here is a scenario:
- You write a module '
test
' containing a class 'testclass
', which will be accessed remotely.
- The server creates one or more instances of the '
testclass
', and registers them with the Pyro Name Server.
- The client queries the Name Server for the location of those objects. It gets a Pyro URI (Universal Resource Identifier) for them.
- The client creates proxies for the remote objects.
- Because the proxy mimics the real '
testclass
', the client can now invoke methods on the remote objects. The proxy will forward the method invocations and return the results, just as if it was the remote object itself.
Not a single line of network communication code has been written.
This looks like a big oversimplification, but it isn't!
To dive directly into the code, have a look at the various Pyro examples in the examples
directory (read the Readme.txt
). There is much to learn there.
Required Software:
- Pyro needs at least Python 2.0.1. However, it is strongly recommended
to use the latest Python version available (at the time of writing 2.2.2).
Pyro might require Python 2.1.x or even Python 2.2.x as time goes on,
because these Python versions contain many bugfixes and improvements over
the older versions! But this version should still work on Python 2.0.1.
- There is some compatibility with Jython (clients only, due to Jython restrictons. Use most recent Jython).
- Pyro should run wherever Python is available, however, the command line
utility scripts are designed for Windows(NT) and Unix sh. You might
experience problems trying to run them on other systems
- The
xnsc
tool requires the Tkinter Python extension module, with Tcl/Tk installed.
Related technology
- Java Remote Method Invocation (RMI)
- Common Object Request Broker Architecture (CORBA)
- Fnorb - a CORBA implementation in Python
- Milton L. Hankins' PyBrenda
- The remoting code included in Profigure by Tom Cocagne
Thanks
I want to thank everybody on the Pyro mailing list,
your participation is of great value.
People who have contributed: John Wiegley, Shinji Suzuki, Olaf Trygve Berglihn, Jesus Cea Avion, Niki Spahiev, Joe VanAndel,
Mark Millikan, and numerous outhers.