Dot.py should support pretty printed dot files

Bug #1019329 reported by Kyle Nitzsche
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
dotdepends
New
Undecided
Unassigned

Bug Description

A current assumption of the Dot.py module (which provides an API for a dot file) is that the dot file is not pretty printed.

Dot.py should work with pretty printed dot files.

One can pretty print a dot file with 'nop afile.dot'.

Pretty printed dot files often split single nodes and edges (aka 'joins;) onto multiple lines. However, Dot.py assumes all node information is on one line and all join info is on one line, thus failing for pretty printed dot files.

This may be easy to fix.

Current Dot.py reads the dot file with: self.dot = f.readlines()

Then self.dot is spit into sections in Dot.py's __init__() (into header, nodes, joins, and footer).

An approach that would support pretty printed dot files may be to use f.read() and then split(';') the file on ";" since that is the delimiter for dot 'lines'. Would need to make all appropriate adjustements in __init__ method calls to ensure proper results.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.