woo.remote

Remote connections to woo: authenticated python command-line over telnet and anonymous socket for getting some read-only information about current simulation.

These classes are used internally in gui/py/PythonUI_rc.py and are not intended for direct use.

class woo.remote.GenericTCPServer(handler, title, cookie=True, minPort=9000, host='', maxPort=65536, background=True)[source]

Base class for socket server, handling port allocation, initial logging and thead backgrounding.

class woo.remote.InfoProvider[source]
basicInfo()[source]
plot()[source]
class woo.remote.PythonConsoleSocketEmulator(request, client_address, server)[source]

Class emulating python command-line over a socket connection.

The connection is authenticated by requiring a cookie. Only connections from localhost (127.0.0.*) are allowed.

displayhook(s)[source]
finish()[source]
handle()[source]
setup()[source]
tryLogin()[source]
woo.remote.runServers(xmlrpc=False, tcpPy=False)[source]

Run python telnet server and info socket. They will be run at localhost on ports 9000 (or higher if used) and 21000 (or higer if used) respectively.

The python telnet server accepts only connection from localhost, after authentication by random cookie, which is printed on stdout at server startup.

The info socket provides read-only access to several simulation parameters at runtime. Each connection receives pickled dictionary with those values. This socket is primarily used by woo-multi batch scheduler.

woo.remote.useQThread = False

Set before using any of our classes to use QThread for background execution instead of the standard thread module. Mixing the two (in case the qt UI is running, for instance) does not work well.

Tip

Report issues or inclarities to github.