comp.lang.ada
 help / color / mirror / Atom feed
* Ada-Python binding
@ 2010-05-07 21:43 Maciej Sobczak
  2010-05-07 22:24 ` Ludovic Brenta
  0 siblings, 1 reply; 3+ messages in thread
From: Maciej Sobczak @ 2010-05-07 21:43 UTC (permalink / raw)


Hello,

The following article might be of interest to programmers practicing
mixed-language development:

http://www.inspirel.com/articles/Ada_Python_Binding.html

This article builds on the various bits and pieces of knowledge that I
needed to collect in order to proceed with one of my projects.
Hopefully it will be useful for others as well.

All comments are welcome.

--
Maciej Sobczak * http://www.inspirel.com

YAMI4 - Messaging Solution for Distributed Systems
http://www.inspirel.com/yami4



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada-Python binding
  2010-05-07 21:43 Ada-Python binding Maciej Sobczak
@ 2010-05-07 22:24 ` Ludovic Brenta
  2010-05-10  9:09   ` Cyrille
  0 siblings, 1 reply; 3+ messages in thread
From: Ludovic Brenta @ 2010-05-07 22:24 UTC (permalink / raw)


Maciej Sobczak writes on comp.lang.ada:
> Hello,
>
> The following article might be of interest to programmers practicing
> mixed-language development:
>
> http://www.inspirel.com/articles/Ada_Python_Binding.html
>
> This article builds on the various bits and pieces of knowledge that I
> needed to collect in order to proceed with one of my projects.
> Hopefully it will be useful for others as well.
>
> All comments are welcome.

The GNAT Programming Studio uses this technique extensively.  Indeed,
Python is not only the scripting language for GPS but also the language
in which parts of GPS are written.  GPS exposes a rich API to the Python
scripts and plug-ins.

You can have a look at the relevant part of the GPS sources here:

[1] http://libre2.adacore.com/viewvc/trunk/gps/gnatlib/src/python
[2] http://libre2.adacore.com/viewvc/trunk/gps/python
[3] http://libre2.adacore.com/viewvc/trunk/gps/share/library
[4] http://libre2.adacore.com/viewvc/trunk/gps/share/plug-ins

[1] is part of what AdaCore want to turn into a reusable library;
currently the sources are still "hidden" inside the GPS source tree.
This is, essentially, an Ada-Python binding that allows not only to call
Ada subprograms from Python but also to launch a Python interpreter and
execute scripts from within an Ada program.

[2] loads the Python interpreter into GPS for to execute plug-ins
and user-defined initialization scripts written in Python.

[3] contains a library of reusable components written in Python, for use
in plug-ins or user-defined scripts.

[4] contains the plug-ins written in Python.

Most of the modules of GPS export an API to these plug-ins; the code
that does that is scattered in the rest of the source tree.

HTH

-- 
Ludovic Brenta.



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Ada-Python binding
  2010-05-07 22:24 ` Ludovic Brenta
@ 2010-05-10  9:09   ` Cyrille
  0 siblings, 0 replies; 3+ messages in thread
From: Cyrille @ 2010-05-10  9:09 UTC (permalink / raw)


> You can have a look at the relevant part of the GPS sources here:
>
> [1]http://libre2.adacore.com/viewvc/trunk/gps/gnatlib/src/python
> [2]http://libre2.adacore.com/viewvc/trunk/gps/python
> [3]http://libre2.adacore.com/viewvc/trunk/gps/share/library
> [4]http://libre2.adacore.com/viewvc/trunk/gps/share/plug-ins
>

you also have on-line documentation at
http://libre.adacore.com/wp-content/files/auto_update/gnatcoll-docs/gnatcoll.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-05-10  9:09 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-05-07 21:43 Ada-Python binding Maciej Sobczak
2010-05-07 22:24 ` Ludovic Brenta
2010-05-10  9:09   ` Cyrille

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