This site's content was compiled from 1993 to 2006. Beyond that, Google is your friend.

Empathy

Maintainer

Daniel Moisset

Description

A binding from Eiffel to Python, by which you can call any routine available in the Python world.

With this library and nothing else you can, for example, use pygtk to write GUI applications.

Status

Daniel writes: I've played a lot with it, but I probably won't have time to mantain it. If someone wants to go on with it (under a GPL or LGPL license), I might be able to help.

Categories

Versions

Links

Example

This example shows how to use GTK (via its Python interface) from Eiffel.

class TEST inherit PYTHON_UTILS creation make feature {NONE} -- Creation make is local rt: PYTHON_RUNTIME res: PYTHON_OBJECT win: PYTHON_OBJECT button: PYTHON_OBJECT do rt.initialize create gtk.import ("gtk") win := (gtk/"GtkWindow") @ (no_args) res := (win/"set_title") @ (<<"Empathy GTK test">>) res := (win/"show") @ (no_args) button := (gtk/"GtkButton") @ (<<"Call Eiffel">>) res := (win/"add") @ (<<button>>) res := (button/"show") @ (no_args) res := (button/"connect") @ (<<"clicked", promote_agent (agent do_something)>>) res := (win/"connect") @ (<<"delete_event", promote_agent (agent quit)>>) res := (gtk/"mainloop") @ (no_args) end feature {NONE} -- Internal gtk: PYTHON_MODULE do_something (t: PYTHON_TUPLE) is do print ("Callback!%N") end quit (t: PYTHON_TUPLE) is local res: PYTHON_OBJECT do res := (gtk/"mainquit") @ (no_args) end end

Supported compilers

Dependencies

Google
 
Web eiffelzone.com