From: Bob D. <bd...@si...> - 2003-11-05 15:11:34
|
John you are my hero!!!! You saved me a whole hell of a lot of time This now works... and I assume the bindings will be just as easy in other languages :) #!/usr/bin/python2.2 import librlib; test = librlib.rlib_init(); res = librlib.rlib_add_datasource_mysql(test, "mysql", "localhost", "user", "password", "database"); librlib.rlib_add_query_as(test, "mysql", "select * from example", "example"); librlib.rlib_add_report(test, "report.xml", ""); librlib.rlib_set_output_format_from_text(test, "PDF"); librlib.rlib_execute(test); librlib.rlib_spool(test); librlib.rlib_free(test); - bob On Tue, 2003-11-04 at 19:02, John Buckman wrote: > > swig looks really nice... I wish I saw that earlier... I'll go swig > > instead... so that way we can have tons of bindings ;) > > Yeah, I was one of the early developers on it, years and years ago. Once you define the C bindings, it'll do everything else for you. The only caveat is that it doesn't make crash-proof APIs (ie, no real parameter checking) but for rlib, that should be fine. > > -john > > > > - Bob > > > On Tue, 2003-11-04 at 17:55, John Buckman wrote: > > > have you thought of wrapping rlib with SWIG http://www.swig.org/ > > > > > > That would give you library capability from: > > > > > > Tcl 8.0 and newer versions. > > > Python 1.5 and newer. > > > Perl 5.003 or newer. > > > Guile 1.3.4 and newer. > > > Java JDK 1.1 and newer. > > > Ruby. > > > Mzscheme. > > > > > > and it's super easy give that you have a C api. > > > |