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()
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()
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())
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()