SWIG and Automated C/C++ Scripting Extensions

By David Beazley

Dr. Dobb's Journal February 1998

(a)
use example;
print example::fact(4);
24
(b)
>>> import example
>>> example.fact(4)
24
>>>
(c)
% load ./example.so
% fact 4
24
%

Example 2: Using (a) Perl, (b) Python, and (c) Tcl extensions.

Back to Article


Copyright © 1998, Dr. Dobb's Journal