Functions
test_nodedesc Namespace Reference

Functions

def test_nodedesc ()
 

Function Documentation

def test_nodedesc.test_nodedesc ( )

Definition at line 4 of file test_nodedesc.py.

5  'Make a wirecell.dfp.graph.Graph'
6 
7  addtypes = True
8  rankdir='TB'
9  if addtypes:
10  rankdir='LR'
11 
12  ag = pgv.AGraph(name="nodetypes", directed=True, strict=False, rankdir=rankdir)
13  ag.node_attr['shape'] = 'record'
14 
15  j = open("nodedesc.json").read()
16  for typ,dat in nodetype.loads(j).items():
17  ag.add_node(typ, label = dot.nodetype_label(dat, addtypes))
18 
19  print ag.string()
20 
21 
int open(const char *, int)
Opens a file descriptor.
int read(int, char *, size_t)
Read bytes from a file descriptor.
def test_nodedesc()
Definition: test_nodedesc.py:4