def exit_if_missing_graphviz ( self ) : ( out , err ) = utils . capture_shell ( "which dot" ) if "dot" not in out : ui . error ( c . MESSAGES [ "dot_missing" ] )
function you can use after dot python
Detect the presence of the dot utility to make a png graph .
def exit_if_missing_graphviz(self):
        """
        Detect the presence of the dot utility to make a png graph.
        """
        (out, err) = utils.capture_shell("which dot")

        if "dot" not in out:
            ui.error(c.MESSAGES["dot_missing"])