Revision 3 as of 2003-07-29 14:39:52

Clear message

elmer [http://elmer.sourceforge.net]

For example...

run Code in C: { { {

} } }

which was written in Python: { { {

} } }

which produces the following output: { { {

} } }

run the same Python code in Tcl: { { {

} } }

which also produces the following output: { { {

} } }


Elmer allows developers to write code in Python and execute it in C or Tcl. The resulting interfaces to the Python code generated by Elmer is transparent to the C or Tcl user... Python calls appear as native calls ( "foo( 1, "a" )" in Python appears as "foo 1 a" in Tcl, for example) and Python and native data types are automatically mapped (Tcl lists are converted to Python lists, Python dictionaries are returned as Tcl associative arrays, char* becomes a Python string object, etc.). Elmer also supports Python's "freeze" module, allowing a Python developer to deliver a single library consisting of several Python files "frozen" in to the application...no need to set PYTHONPATH or have Python source files accompanying the app.

By simply specifying either the C-mode or Tcl-mode, developers can use the same Python modules in either C or Tcl programs...the C or Tcl programmer need not know that the module was written in Python (or any other language for that matter).

Elmer has been used in large software projects, where different teams wrote re-usable modules in different languages (namely, Python, Tcl, and C). Elmer has allowed the large number of Python modules written to be seamlessly used in Tcl and C programs without having to re-write them in the native languages.

Elmer allows various data types to pass between Python and C or Tcl as native types (when supported). For example, a Python dictionary of strings to lists-of-floats is automatically converted to a Tcl associative array of strings and lists-of-floats. A Tcl string is automatically converted to a Python string object...no special quoting required. Python objects are even handled and can be passed to other Python code through the Tcl interpreter. For example, In the C program above, a Python list was retrieved and passed to another Pyhton function.

Elmer allows developers to leverage the strengths of various languages without the restrictions of language barriers. Developers do not need to learn special APIs or access the internals of the language...all code appears native to the language of the application, even if not written in the host language. The intended interface for the Python module is preserved and not wrapped around obfuscating "eval" calls or other mechanisms which hinder readability and re-usability.

Although the core features of Elmer have gone unchanged for several years, and it has been successfully used in a large commercial project by many different kinds of developers, it is still considered beta. Your feedback is greatly appreciated!

[http://elmer.sourceforge.net]

Unable to edit the page? See the FrontPage for instructions.