def submit(self, host=None, port=None):
        if host is None:
            host = os.getenv('PULIHOST', 'puliserver')
        if port is None:
            port = int(os.getenv('PULIPORT', 8004))

        repr = self.prepareGraphRepresentation()

        print ""
        print("---------------------")
        print "Sending graph: %s:%r" % (host, port)
        print("---------------------")
        jsonRepr = json.dumps(repr)

        conn = httplib.HTTPConnection(host, port)
        conn.request(
            'POST', '/graphs/', jsonRepr, {'Content-Length': len(jsonRepr)})
        response = conn.getresponse()

        # print "---"
        print "Upload complete, response:%r" % response.status
        print("---------------------")
        print ""

        if response.status in (200, 201):
            return response.getheader('Location'), response.read()
        else:
            raise GraphSubmissionError((response.status, response.reason))
| Prepare a graph representation and send it to the server.
dataset/ETHPy150Open mikrosimage/OpenRenderManagement/src/puliclient/__init__.py/Graph.submit