CXX -- C++ Extensions Support

Note as of March, 1999.

You don't really make and install CXX in the conventional sense. The makethis.py / Setup enclosed is for the demo. You'll need to make Python with C++. ECGS does not quite compile CXX yet but is getting there.

Version 2 (Dec. 28, 1998)

Fixed definition of extension type to match 1.5.2. This version will presumably not compile with older versions of Python. This can be fixed by using the previous version's definition. I did not take the time to find out what these new "flags" are for nor put in any methods to deal with them.

Version 1

This is an experimental set of files for supporting the creation of Python extensions in C++.

Documentation is in progress at http://xfiles.llnl.gov.

To use CXX you use the header files in Include, such as CXX_Objects.h or CXX_Extensions.h. You must include the sources in Src in your sources to supply parts of the CXX classes required.

A demo is included. The Setup file in this directory compiles this demo named "example". To try the demo, which is also a test routine, you import example and then execute:

example.test()

You can also play with the extension object whose constructor is named "r":

s = r(1, 100, 2)
print s[2]  # should print 5

Compilation with Microsoft Visual C++ 5.0 will succeed but only if you have Service Pack 3 installed. Compilation has been known to succeed on a Unix system using KCC by using:

setenv CCC "KCC -x"

before running makethis.py.

There is also a python.cxx file for making a stand-alone Python containing this example, as well as a similar file arraytest.cxx for testing Array.

Comments to dubois1@llnl.gov, please.

Paul Dubois