forked from tomerfiliba-org/rpyc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path__init__.py
60 lines (49 loc) · 2.23 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
"""
::
##### ##### ####
## ## ## ## ## ####
## ## ## ## ## #
##### ##### ## ## ## ##
## ## ## ## ## ## #
## ## ## ### ## ###
## ## ## ## #####
-------------------- ## ------------------------------------------
##
Remote Python Call (RPyC)
Licensed under the MIT license (see `LICENSE` file)
A transparent, symmetric and light-weight RPC and distributed computing
library for python.
Usage::
>>> import rpyc
>>> c = rpyc.connect_by_service("SERVICENAME")
>>> print c.root.some_function(1, 2, 3)
Classic-style usage::
>>> import rpyc
>>> # `hostname` is assumed to be running a slave-service server
>>> c = rpyc.classic.connect("hostname")
>>> print c.execute("x = 5")
None
>>> print c.eval("x + 2")
7
>>> print c.modules.os.listdir(".") #doctest: +ELLIPSIS
[...]
>>> print c.modules["xml.dom.minidom"].parseString("<a/>") #doctest: +ELLIPSIS
<xml.dom.minidom.Document instance at ...>
>>> f = c.builtin.open("foobar.txt", "rb") #doctest: +SKIP
>>> print f.read(100) #doctest: +SKIP
...
"""
# flake8: noqa: F401
from rpyc.core import (SocketStream, TunneledSocketStream, PipeStream, Channel,
Connection, Service, BaseNetref, AsyncResult, GenericException,
AsyncResultTimeout, VoidService, SlaveService, MasterService, ClassicService)
from rpyc.utils.factory import (connect_stream, connect_channel, connect_pipes,
connect_stdpipes, connect, ssl_connect, discover, connect_by_service, connect_subproc,
connect_thread, ssh_connect)
from rpyc.utils.helpers import async_, timed, buffiter, BgServingThread, restricted
from rpyc.utils import classic
from rpyc.version import version as __version__
from rpyc.lib import setup_logger, spawn
from rpyc.utils.server import OneShotServer, ThreadedServer, ThreadPoolServer, ForkingServer
__author__ = "Tomer Filiba (tomerfiliba@gmail.com)"
globals()['async'] = async_ # backward compatibility