def _intermediary_to_dot ( tables , relationships ) : t = '\n' . join ( t . to_dot ( ) for t in tables ) r = '\n' . join ( r . to_dot ( ) for r in relationships ) return '{}\n{}\n{}\n}}' . format ( GRAPH_BEGINNING , t , r )
how to create dot file in python
Returns the dot source representing the database in a string .
def _intermediary_to_dot(tables, relationships):
    """ Returns the dot source representing the database in a string. """
    t = '\n'.join(t.to_dot() for t in tables)
    r = '\n'.join(r.to_dot() for r in relationships)
    return '{}\n{}\n{}\n}}'.format(GRAPH_BEGINNING, t, r)