slang-users mailing list

[2004 Date Index] [2004 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: [slang-users] gdbm module


On Mon, Sep 13, 2004 at 05:27:37PM -0500, Ben Duncan wrote:
> Thank you very much!!! It looked like I was going to have to write
> one of those for my project.

You're welcome. If your project is still centered on creating an accounting
application, the mysql module might be more useful. Gdbm just stores and
retrieves key-value pairs.

Meanwhile I've read this in the Apache manual:

  Important compatibility note: The implementation of "dbmopen" in the apache
  modules reads the string length of the hashed values from the DBM data
  structures, rather than relying upon the string being NULL-appended. Some
  applications, such as the Netscape web server, rely upon the string being
  NULL-appended, so if you are having trouble using DBM files interchangeably
  between applications this may be a part of the problem.
  
  A perl script called dbmmanage is included with Apache. This program can
  be used to create and update DBM format password files for use with this
  module.
  
I've played with the dbmmanage script, it seems that version 1.2 of slgdbm
is not only incompatible with python but also with perl and Apache. It
should be compatible with Netscape web server, but I don't have that program
installed.
So I made some changes to store and fetch strings without \0. It seems to be
compatible with python and perl now. I'll upload version 1.3 after some more
testing.
Maybe I'll add some assoc semantics, so instead of
value = gdbm_fetch(db, key);
you could write
value = db[key];

_______________________________________________
To unsubscribe, visit http://jedsoft.org/slang/mailinglists.html


[2004 date index] [2004 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]