import pickle

class Message:

    RUN_COVARS = 0
    RUN_CLUSTERS = 1
    
    STRING=2
    PROGRESS=3
    DONE = 4
    KILL_ALL = 5
    RUN_REGIMES = 6
    FILE=7
    GRAPH=8
    
    _SEP = '$$'.encode()
    def __init__(self, what,data):
        self.cmd = what
        self.args = data
 
    def tos(self):
        s = pickle.dumps(self)
        return s 
       
    
