...
 
Commits (8)
......@@ -42,6 +42,7 @@ def sendToMgv(msg, address=None, port=None):
text = None
try:
port = int(os.getenv("MGVPORT")) if port is None else int(port)
s.settimeout(5)
s.connect((address, port))
s.send(msg.encode())
text = s.recv(4096)
......@@ -52,6 +53,13 @@ def sendToMgv(msg, address=None, port=None):
return text
def open(path=None):
if path is None:
path = ':'.join([os.getenv("MGVPROJECTNAME"), os.getenv("MGVPATTERNNAME"), os.getenv("MGVGRAPHKEYS")])
msg = "*MGVSEPARATOR*".join(["OPEN", path])
return sendToMgv(msg)
def setParam(param, value):
"""Modify a parameter value of the current node.
......
This diff is collapsed.