skip to main content
OSTI.GOV title logo U.S. Department of Energy
Office of Scientific and Technical Information

Title: Reflection-Based Python-C++ Bindings

Abstract

Python is a flexible, powerful, high-level language with excellent interactive and introspective capabilities and a very clean syntax. As such, it can be a very effective tool for driving physics analysis. Python is designed to be extensible in low-level C-like languages, and its use as a scientific steering language has become quite widespread. To this end, existing and custom-written C or C++ libraries are bound to the Python environment as so-called extension modules. A number of tools for easing the process of creating such bindings exist, such as SWIG and Boost. Python. Yet, the process still requires a considerable amount of effort and expertise. The C++ language has few built-in introspective capabilities, but tools such as LCGDict and CINT add this by providing so-called dictionaries: libraries that contain information about the names, entry points, argument types, etc. of other libraries. The reflection information from these dictionaries can be used for the creation of bindings and so the process can be fully automated, as dictionaries are already provided for many end-user libraries for other purposes, such as object persistency. PyLCGDict is a Python extension module that uses LCG dictionaries, as PyROOT uses CINT reflection information, to allow /cwPython users to accessmore » C++ libraries with essentially no preparation on the users' behalf. In addition, and in a similar way, PyROOT gives ROOT users access to Python libraries.« less

Authors:
; ;
Publication Date:
Research Org.:
Lawrence Berkeley National Lab. (LBNL), Berkeley, CA (United States)
Sponsoring Org.:
USDOE Director. Office of Science. Office of High Energy Physics (US)
OSTI Identifier:
835826
Report Number(s):
LBNL-56538
R&D Project: PAC11H; TRN: US0500413
DOE Contract Number:  
AC03-76SF00098
Resource Type:
Conference
Resource Relation:
Conference: Computing in High Energy and Nuclear Physics (CHEP) 2004, Interlaken (CH), 09/27/2004--10/01/2004; Other Information: PBD: 14 Oct 2004
Country of Publication:
United States
Language:
English
Subject:
71 CLASSICAL AND QUANTUM MECHANICS, GENERAL PHYSICS; 73 NUCLEAR PHYSICS AND RADIATION PHYSICS; 99 GENERAL AND MISCELLANEOUS//MATHEMATICS, COMPUTING, AND INFORMATION SCIENCE; DICTIONARIES; NUCLEAR PHYSICS; REFLECTION; HIGH ENERGY PHYSICS; COMPUTERS; LCG SEAL DICTIONARY PYLCGDICT PYROOT ROOT CINT PYREFLEX

Citation Formats

Generowicz, Jacek, Lavrijsen, Wim T.L.P., Marino, Massimo, and Mato, Pere. Reflection-Based Python-C++ Bindings. United States: N. p., 2004. Web.
Generowicz, Jacek, Lavrijsen, Wim T.L.P., Marino, Massimo, & Mato, Pere. Reflection-Based Python-C++ Bindings. United States.
Generowicz, Jacek, Lavrijsen, Wim T.L.P., Marino, Massimo, and Mato, Pere. 2004. "Reflection-Based Python-C++ Bindings". United States. https://www.osti.gov/servlets/purl/835826.
@article{osti_835826,
title = {Reflection-Based Python-C++ Bindings},
author = {Generowicz, Jacek and Lavrijsen, Wim T.L.P. and Marino, Massimo and Mato, Pere},
abstractNote = {Python is a flexible, powerful, high-level language with excellent interactive and introspective capabilities and a very clean syntax. As such, it can be a very effective tool for driving physics analysis. Python is designed to be extensible in low-level C-like languages, and its use as a scientific steering language has become quite widespread. To this end, existing and custom-written C or C++ libraries are bound to the Python environment as so-called extension modules. A number of tools for easing the process of creating such bindings exist, such as SWIG and Boost. Python. Yet, the process still requires a considerable amount of effort and expertise. The C++ language has few built-in introspective capabilities, but tools such as LCGDict and CINT add this by providing so-called dictionaries: libraries that contain information about the names, entry points, argument types, etc. of other libraries. The reflection information from these dictionaries can be used for the creation of bindings and so the process can be fully automated, as dictionaries are already provided for many end-user libraries for other purposes, such as object persistency. PyLCGDict is a Python extension module that uses LCG dictionaries, as PyROOT uses CINT reflection information, to allow /cwPython users to access C++ libraries with essentially no preparation on the users' behalf. In addition, and in a similar way, PyROOT gives ROOT users access to Python libraries.},
doi = {},
url = {https://www.osti.gov/biblio/835826}, journal = {},
number = ,
volume = ,
place = {United States},
year = {Thu Oct 14 00:00:00 EDT 2004},
month = {Thu Oct 14 00:00:00 EDT 2004}
}

Conference:
Other availability
Please see Document Availability for additional information on obtaining the full-text document. Library patrons may search WorldCat to identify libraries that hold this conference proceeding.

Save / Share: