Forum OpenACS Q&A: nstcl package: some common ns_* functions for tclsh
It's currently at version 0.2, and can be downloaded at: http://michael.cleverly.com/aolserver/nstcl. Currently it supports ns_db for Postgres and Solid (provided pgtclsh/libpgtcl.so or soltcl/soltcl.so is used/available). I'm interested in feedback, suggestions, etc.
Anyway, I don't know if this will be useful to anyone else or not, but since I write far and away more Tcl code for AOLserver than I do for standard tclsh/expect scripts, I enjoy being able to be lazy and not have to use database specific routines.
This is something that I've always wanted in Tcl and was very surprised that it wasn't available. The coolest thing is that I can use the good old ns_* calls that everyone is used to in their plain Tcl programs.
I've looked at Michael's code and it is pretty easy to add "drivers" to other DBs.
nstcl will fit like a glove in a free point-of-sale application that I intend to write using OpenACS' ecommerce datamodel and Tcl/Tk. Thanks Michael.