473,322 Members | 1,431 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

Graphviz Python Binding for Python 2.5 on Windows?

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

Mar 5 '07 #1
10 3216
Hi!

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

@-salutations

Michel Claveau
Mar 5 '07 #2
Thanks Michel, I will give it a try.

Alex

Mar 6 '07 #3
On Mar 5, 5:16 pm, "Alex Li" <likw...@gmail.comwrote:
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.

Mar 6 '07 #4
On Mar 6, 8:39 am, "Nick Vatamaniuc" <vatam...@gmail.comwrote:
On Mar 5, 5:16 pm, "Alex Li" <likw...@gmail.comwrote:
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.
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

Mar 6 '07 #5
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 :)
Mar 6 '07 #6
On Mar 5, 5:16 pm, "Alex Li" <likw...@gmail.comwrote:
I tried to avoid. Any suggestions?
try the networkx package, it includes the pygraphviz module that can
generate dot files:

https://networkx.lanl.gov/wiki

Istvan

Mar 6 '07 #7
On Mar 6, 3:18 pm, "Istvan Albert" <istvan.alb...@gmail.comwrote:
try the networkx package, it includes the pygraphviz module that can
generate dot files:

https://networkx.lanl.gov/wiki
should've checked it before posting, it seems nowadays is actually a
separate package

https://networkx.lanl.gov/wiki/pygraphviz

Mar 6 '07 #8
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

Mar 6 '07 #9
On Mar 6, 3:20 pm, "Istvan Albert" <istvan.alb...@gmail.comwrote:
>
https://networkx.lanl.gov/wiki/pygraphviz
Thanks Albert. I looked into pygraphviz as well but it requires
compiling C extension, and there is no Windows compilation instruction
(though it probably won't be hard).

Mar 7 '07 #10
In message <11*********************@n33g2000cwc.googlegroups. com>, Alex
Li <li*****@gmail.comwrites
>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
--
Ian Parker
Mar 7 '07 #11

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

30
by: Christian Seberino | last post by:
How does Ruby compare to Python?? How good is DESIGN of Ruby compared to Python? Python's design is godly. I'm wondering if Ruby's is godly too. I've heard it has solid OOP design but then...
10
by: Andrew Dalke | last post by:
Is there an author index for the new version of the Python cookbook? As a contributor I got my comp version delivered today and my ego wanted some gratification. I couldn't find my entries. ...
1
by: Sergio | last post by:
I'm writing a cgi script that uses graphviz (the dot program) to generate a graph and I'm banging my head against the wall trying to get it to work properly. Currently, if I run the script directly...
9
by: svenn.are | last post by:
Hi, has anybody thought of / already used graphviz to convert the output of trace.py into a graph? I looked at PyUMLGraph, but 1. PyUMLGraph does not successfully create a dot file, and 2. I...
2
by: samhng | last post by:
Hi, I am new to Graphviz/dot language, the source .dot files are chaos so I am looking for source formatter for the .dot files, any ideas?
22
by: Glurt Wuntal | last post by:
I am a newbie with Python. It's a great language, but I would like to be able to present a simple gui menu for some of my scripts; something better than using 'raw_input' prompts. Any...
6
by: Qun Cao | last post by:
Hi Everyone, I am a beginner on cross language development. My problem at hand is to build a python interface for a C++ application built on top of a 3D game engine. The purpose of this python...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.