__init__.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. """
  2. .
  3. ##### ##### ####
  4. ## ## ## ## ## ####
  5. ## ## ## ## ## #
  6. ##### ##### ## ## ## ##
  7. ## ## ## ## ## ## #
  8. ## ## ## ### ## ###
  9. ## ## ## ## #####
  10. -------------------- ## ------------------------------------------
  11. ##
  12. Remote Python Call (RPyC) v $$VERSION$$, $$DATE$$
  13. Licensed under the MIT license (see `LICENSE` file)
  14. A transparent, symmetric and light-weight RPC and distributed computing
  15. library for python.
  16. Usage:
  17. import rpyc
  18. c = rpyc.connect_by_service("SERVICENAME")
  19. print c.root.some_function(1, 2, 3)
  20. Classic-style usage:
  21. import rpyc
  22. # `hostname` is assumed to be running a slave-service server
  23. c = rpyc.classic.connect("hostname")
  24. print c.execute("x = 5")
  25. print c.eval("x + 2")
  26. print c.modules.os.listdir(".")
  27. print c.modules["xml.dom.minidom"].parseString("<a/>")
  28. f = c.builtin.open("foobar.txt", "rb")
  29. print f.read(100)
  30. """
  31. from rpyc.core import (SocketStream, PipeStream, Channel, Connection, Service,
  32. BaseNetref, AsyncResult, GenericException, AsyncResultTimeout, VoidService,
  33. SlaveService)
  34. from rpyc.utils.factory import (connect_stream, connect_channel, connect_pipes,
  35. connect_stdpipes, connect, tlslite_connect, ssl_connect, discover,
  36. connect_by_service, connect_subproc, connect_thread)
  37. from rpyc.utils.helpers import async, timed, buffiter, BgServingThread
  38. from rpyc.utils import classic
  39. from rpyc.version import version, version_string, release_date
  40. __author__ = "Tomer Filiba (tomerfiliba@gmail.com)"
  41. __version__ = version
  42. __doc__ = __doc__.replace("$$VERSION$$", version_string).replace("$$DATE$$", release_date)
  43. del version_string, release_date