Unidata - To provide the data services, tools, and cyberinfrastructure leadership that advance Earth system science, enhance educational opportunities, and broaden participation. Unidata
         
  advanced  
 

SWIG and the netCDF library interfaces

With all the discussion about adding the Java interface and with
Rob Managan <managan@xxxxxxxx> mention about a Python interface.
I thought I would bring up the tool SWIG which allows one to take
C (and C++) code and interface with Tcl, Perl, Python, or Guile.
I have not tried it yet but it seems like a very easy way to add
netCDF to these scripting languages.  And it might be extendable
to Java.  More information is available at
        http://www.cs.utah.edu/~beazley/SWIG/
It is something to consider.  Below is part of the web page.
Paul
   Paul F. Hein   hein@xxxxxxxxxxxxxxxxxxxxxxxxxxx   (970) 491-8531


SWIG
Simplified Wrapper and Interface Generator

Introduction

SWIG is an easy to use tool that lets you add Tcl, Perl, Python, or Guile to
programs written in C and C++. Normally, this requires you to write special
"wrapper" functions---a process that is both tedious and error-prone. SWIG frees
you from this task and allows you to focus on the application at hand while 
providing all of the benefits of using an interpreted scripting language 
interface.

A brief overview of features

       Supports Tcl, Perl4, Perl5, Python, and Guile-3. 
       Allows you to add C/C++ functions, variables, and constants. 
       Handles almost all C datatypes and pointers. 
       Run-time type checking of pointers. 
       Automatic documentation generation in ASCII, LaTeX, or HTML. 
       Extends common applications including tclsh, wish, and expect. 
       Can be extended to support new target languages. 


 
 
  Contact Us     Site Map     Search     Terms and Conditions     Privacy Policy     Participation Policy
 
National Science Foundation (NSF) UCAR Community Programs   Unidata is a member of the UCAR Community Programs, is managed by the University Corporation for Atmospheric Research, and is sponsored by the National Science Foundation.
P.O. Box 3000     Boulder, CO 80307-3000 USA     Tel: 303-497-8643     Fax: 303-497-8690