<- Back | Index | Forward ->

DaySWIG

Daylight provides C and Fortran interfaces to their Toolkit, but none for Python, Perl, Tcl, etc.. Luckily, these languages provide ways to interface with C and C++ functions.

That's where DaySWIG comes in:

C code:
  dt_Integer handle = dt_cansmiles(4, "COO");
  dt_Integer datatype = dt_type(handle);
  dt_dealloc(handle);

Python equivalent:
  from dayswig_python import *
  handle = dt_cansmiles("COO")
  datatype = dt_type(handle)
  dt_dealloc(handle)