Pyparsing dependency

353 views
Skip to first unread message

gerwin

unread,
Apr 4, 2008, 11:35:32 AM4/4/08
to pydot
Hi there,

I wanted to try out the new pydot but got a warning message during the
python setup.py install:
"Couldn't import dot_parser, loading of dot files will not be
possible."
It appears that stuff breaks because the dot_parser.py file tries to
load recent features
" from pyparsing import ( nestedExpr, "
This "nestedExpr" appears only available from pyparsing 1.4.8, as of
Oct. 2007 (see http://pyparsing.wikispaces.com/News?f=print)
Pyparsing version 1.4.2 is provided in stock ubuntu Feisty,Gutsy, so
you might want to make this dependency clear the users through the
front-page.

ps. anyone has any idea if the set_style method on a Cluster has been
recently changed or removed from either graphviz or pydot?

regards,
Gerwin de Haan

gerwin

unread,
Apr 7, 2008, 1:05:15 PM4/7/08
to pydot
Found some of the causes of my upgrade difficulties:

> ps. anyone has any idea if the set_style method on a Cluster has been
> recently changed or removed from either graphviz or pydot?

I found a bug in my code that worked in the older 0.9.8 version:
node.set_style('filled,rounded')
now I had to watch those spaces to make things go fine:
node.set_style('filled, rounded')

in addition, I found that cluster object lacked "set_color" and more,
so I had to add:
self.create_attribute_methods(CLUSTER_ATTRIBUTES)
to the end of Cluster.__init__ to get the cluster specific attributes

Finally, I used a python int value when setting stuff:
node.set_fontsize(8)
has to be
node.set_fontsize("8")
I couldn't point my finger directly on where to put a good fix

regards,
Gerwin
Reply all
Reply to author
Forward
0 new messages