comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: Import Python library into an Ada package?
Date: Fri, 4 Dec 2020 15:22:46 +0200	[thread overview]
Message-ID: <i2urh6FifrjU1@mid.individual.net> (raw)
In-Reply-To: <7223f058-c593-4905-b9ba-0a5cb3e64de2n@googlegroups.com>

On 2020-12-04 9:36, Roger Mc wrote:
> Is it possible to import a Python library, such as graphviz, into an Ada package?


If you mean the Graphviz tool-set, 
https://en.wikipedia.org/wiki/Graphviz, that seems to be written in C 
and to be open source. You should be able to call Graphviz functions 
from Ada in the same way as one calls any C code from Ada. The Python 
module you refer to is probably just a binding from Python to the C code 
in Graphviz.

If you want to use Graphviz just to draw automatically laid-out graphs, 
there is another way, that I have used: make the Ada program write out 
the graph definition as a text file in the "dot" language, and then 
invoke the "dot" program from Graphviz to lay out and draw the graph 
into some graphical format. However, it may be troublesome to make this 
method work interactively -- I was satified with non-interactive 
post-processing of the "dot" file generated by my Ada program.

  parent reply	other threads:[~2020-12-04 13:22 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04  7:36 Import Python library into an Ada package? Roger Mc
2020-12-04 10:23 ` Dmitry A. Kazakov
2020-12-04 11:37   ` Roger Mc
2020-12-04 13:55     ` Simon Wright
2020-12-04 13:22 ` Niklas Holsti [this message]
2020-12-04 13:41   ` gautier...@hotmail.com
2020-12-04 18:32   ` Björn Lundin
2020-12-04 19:08     ` Roger Mc
2020-12-04 19:40       ` Niklas Holsti
2020-12-04 21:25         ` Björn Lundin
2020-12-04 23:33           ` Roger Mc
2020-12-04 21:09     ` Dmitry A. Kazakov
2020-12-04 21:15       ` Roger Mc
2020-12-04 21:12 ` Per Sandberg
2020-12-04 21:19   ` Roger Mc
2020-12-04 23:17     ` Dmitry A. Kazakov
2020-12-04 23:42       ` Roger Mc
2020-12-04 23:57         ` Roger Mc
2020-12-05  0:13           ` Roger Mc
2020-12-05  9:38         ` Dmitry A. Kazakov
     [not found] ` <f185d71f-2217-4e1f-b6bc-bd854738999an@googlegroups.com>
2020-12-16 23:58   ` Roger Mc
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox