problems with Python cgi web counter and (g)dbm

Michel Vanaken Michel at idtech.be
Thu May 20 06:32:20 EDT 1999


In article <harmsPOST-1505991053050001 at annex4-12.cc.umanitoba.ca>, 
harmsPOST at mbnet.mb.ca says...
>
>I have adapted the Python counter cgi script of  Sabine Appelmans, 
> http://www.ping.be/sabine-appelmans/home/python/index.html 
>

Well, first, thx for visiting my home page (btw the poor Sabine has nothing to 
do with that script :-).

>However when I try to make the database online, I get the following errors:
>
>>>> import dbm
>Traceback (innermost last):
>  File "<stdin>", line 1, in ?
>ImportError: No module named dbm

Obviously, your Python is not configured to use gdbm.  

This was stated in the introduction :

"""
And of course, you should have installed Python on your system. You'll need to 
configure it to use the gdbm module, since it's used in count.py.
"""

But you should follow the advice of Frederick. 
That page is quite outdated.  For example, the cgi module has changed a lot 
since I wrote that article (it was in august 96, for Python 1.3, and 1.4 was 
released short after).
See also the note about debugging in the text of the article.

HT(script)H,
Michel
--------------------------------------------------------------------
http://www.ping.be/~ping0200/home/





More information about the Python-list mailing list