Graphviz Python Binding for Python 2.5 on Windows?

A

Alex Li

Hello,

I would like to use Python 2.5 on Windows with Graphviz to generate
graphs. I used yapgvb but it only requires Python 2.4 (won't work
with Python 2.5). Other packages like pydot seems to be unmaintained
or requires custom building to be used on Windows (pygraphviz), which
I tried to avoid. Any suggestions?

Thanks in advance,
Alex
 
M

Méta-MCI

Hi!

You can also use/call GraphViz by COM.
It's run OK with P2.3 - 2.4 & 2.5

@-salutations

Michel Claveau
 
I

Ian Parker

Alex said:
Thanks Michel, I will give it a try.

Alex

You could simply generate the .dot files from python and do os.startfile
on the dot file (which is what I do because it is remarkably easy!)

Regards
 
N

Nick Vatamaniuc

Hello,

I would like to use Python 2.5 on Windows with Graphviz to generate
graphs. I used yapgvb but it only requires Python 2.4 (won't work
with Python 2.5). Other packages like pydot seems to be unmaintained
or requires custom building to be used on Windows (pygraphviz), which
I tried to avoid. Any suggestions?

Thanks in advance,
Alex

Alex,
You can always pipe your dot file directly to the dot or neato
executables using the subprocess method then read the output. This way
you don't have to install yapgvb or other adapters and it will work
with Python 2.5. But you will need to compose your dot file as a giant
character buffer...
-Nick V.
 
S

SPE - Stani's Python Editor

Alex,
You can always pipe your dot file directly to the dot or neato
executables using the subprocess method then read the output. This way
you don't have to install yapgvb or other adapters and it will work
with Python 2.5. But you will need to compose your dot file as a giant
character buffer...
-Nick V.

Not really a solution, but you can always install a virtual machine
with Ubuntu (or other linux flavour) where pydot is available for
python2.5 (sudo apt-get install python-pydot).

Stani
 
A

Alex Li

Thanks all for your suggestions.

Nick: I am trying to avoid generate the dot file manually so that I
can minimize bugs coz by me ;)

SPE: Unfortunately that may be too radical ;) I work in a corporate
environment (read: MS shop) and my group wants to generate a
dependency graph of our system. I was trying to take this opportunity
to introduce some python to the group. They were amazed when I came
up with the script in a few hours and were willing to try it out by
installing python, yapgvb, and graphviz. But it won't work on python
2.5! It's kind of a bummer to tell them to install an older version
of python.

On second look, I will try pydot again. Despite no release for a long
time, it seems to be reasonably complete. Now, I am sure we will redo
it in C# after my "prototype"; but that will just prove the advantages
of python in terms of code size and productivity :)
 
B

bearophileHUGS

Alex Li:
Now, I am sure we will redo it in C# after my "prototype";

Sadly this happens often, they don't want to keep using two languages
when one may suffice. On the other hand, you may even find a way to
adapt your Python code to IronPython, so maybe you can avoid the
translation to C#.

Bye,
bearophile
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top