Graphviz Python Binding for Python 2.5 on Windows?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Alex Li

    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

  • Méta-MCI

    #2
    Re: Graphviz Python Binding for Python 2.5 on Windows?

    Hi!

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

    @-salutations

    Michel Claveau


    Comment

    • Alex Li

      #3
      Re: Graphviz Python Binding for Python 2.5 on Windows?

      Thanks Michel, I will give it a try.

      Alex



      Comment

      • Nick Vatamaniuc

        #4
        Re: Graphviz Python Binding for Python 2.5 on Windows?

        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.

        Comment

        • SPE - Stani's Python Editor

          #5
          Re: Graphviz Python Binding for Python 2.5 on Windows?

          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

          Comment

          • Alex Li

            #6
            Re: Graphviz Python Binding for Python 2.5 on Windows?

            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 :)


            Comment

            • Istvan Albert

              #7
              Re: Graphviz Python Binding for Python 2.5 on Windows?

              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:



              Istvan

              Comment

              • Istvan Albert

                #8
                Re: Graphviz Python Binding for Python 2.5 on Windows?

                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



                Comment

                • bearophileHUGS@lycos.com

                  #9
                  Re: Graphviz Python Binding for Python 2.5 on Windows?

                  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

                  Comment

                  • Alex Li

                    #10
                    Re: Graphviz Python Binding for Python 2.5 on Windows?

                    On Mar 6, 3:20 pm, "Istvan Albert" <istvan.alb...@ gmail.comwrote: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).

                    Comment

                    • Ian Parker

                      #11
                      Re: Graphviz Python Binding for Python 2.5 on Windows?

                      In message <1173160979.344 083.91030@n33g2 000cwc.googlegr oups.com>, Alex
                      Li <likwoka@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

                      Comment

                      Working...