When attempting to set all the nodes in graph in dot
format to a common style, the call to
set_all_node_style in the Dot class in the file pydot.py
fails with an exception.
The reason is that it cannot find num2lab. I am guessing
this is to convert a node number to a label. I have
checked pygraph.py and num2lab doesn't exist
(possibly existed in an earlier version).
I am using Python 2.4 on Windows XP with pygraphlib-
0.6.0.1
I can be contacted at darthmike29@yahoo.com.au
Hope this helps.
Mike
Example error output....
C:\Documents and Settings\Michael>python
ActivePython 2.4 Build 244 (ActiveState Corp.) based on
Python 2.4 (#60, Feb 9 2005, 19:03:27) [MSC v.1310
32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more
information.
>>> from pygraphlib import pygraph
>>> graph = from_file('teams.dat')
>>> from pygraphlib import pydot
>>> dot = pydot.Dot(graph)
>>>
>>> dot.set_all_node_style(shape='rect')
Traceback (most recent call last):
File "<stdin>", line 1, in ?
File "C:\Program Files\Python24\Lib\site-
packages\pygraphlib\pydot.py", line 1
09, in set_all_node_style
node = self.graph.num2lab[node]
AttributeError: DGraph instance has no
attribute 'num2lab'
>>>