示例#1
0
def run_client(host=DEFAULT_HOST, port=DEFAULT_PORT, print_stacks=True, ipython=True):
    conn = connect(host=host, port=port)
    if print_stacks:
        print conn.modules['pystuck.thread_probe'].stacks_repr()
    if ipython:
        from pystuck.ipython import ishell
        modules = conn.modules
        print "use the 'modules' dictionary to access remote modules (like 'os', or '__main__')"
        ishell()
示例#2
0
def run_client(host=DEFAULT_HOST, port=DEFAULT_PORT, unix_socket=None, stacks=True, ipython=True, greenlets=True):
    conn = connect(host=host, port=port) if unix_socket is None else unix_connect(unix_socket)
    if stacks:
        print conn.modules['pystuck.thread_probe'].stacks_repr(greenlets=greenlets)
    if ipython:
        from pystuck.ipython import ishell
        modules = conn.modules
        print "use the 'modules' dictionary to access remote modules (like 'os', or '__main__')"
        ishell()
示例#3
0
def run_client(host=DEFAULT_HOST, port=DEFAULT_PORT, stacks=False, ipython=True,
               greenlets=True):
    from rpyc.utils.classic import connect
    conn = connect(host=host, port=port)
    if stacks:
        print(conn.modules['pystuck.thread_probe'].stacks_repr(
            greenlets=greenlets))
    if ipython:
        from pystuck.ipython import ishell
        modules = conn.modules
        ishell(local_ns=locals())
示例#4
0
def run_client(host=DEFAULT_HOST,
               port=DEFAULT_PORT,
               print_stacks=True,
               ipython=True):
    conn = connect(host=host, port=port)
    if print_stacks:
        print conn.modules['pystuck.thread_probe'].stacks_repr()
    if ipython:
        from pystuck.ipython import ishell
        modules = conn.modules
        print "use the 'modules' dictionary to access remote modules (like 'os', or '__main__')"
        ishell()
示例#5
0
def run_client(host=DEFAULT_HOST,
               port=DEFAULT_PORT,
               stacks=False,
               ipython=True,
               greenlets=True):
    from rpyc.utils.classic import connect
    conn = connect(host=host, port=port)
    if stacks:
        print(conn.modules['pystuck.thread_probe'].stacks_repr(
            greenlets=greenlets))
    if ipython:
        from pystuck.ipython import ishell
        modules = conn.modules
        ishell(local_ns=locals())
示例#6
0
def run_client(host=DEFAULT_HOST,
               port=DEFAULT_PORT,
               unix_socket=None,
               stacks=True,
               ipython=True,
               greenlets=True):
    from rpyc.utils.classic import connect, unix_connect
    conn = connect(
        host=host,
        port=port) if unix_socket is None else unix_connect(unix_socket)
    if stacks:
        print(conn.modules['pystuck.thread_probe'].stacks_repr(
            greenlets=greenlets))
    if ipython:
        from pystuck.ipython import ishell
        modules = conn.modules
        print(
            "use the 'modules' dictionary to access remote modules (like 'os', or '__main__')"
        )
        ishell()