finding a module

Kevin Dahlhausen kdahlhaus at
Fri Jan 25 09:21:21 EST 2002

I'm having a little trouble finding a c extension.  Here's the

I have a web host that allows python cgi.  I've also written a wrapper
for a library.  The wrapper is a subdirectory with an
file.  In the same subdirectory is a swig-generated c wrapper ( ) that is imported by one of the files imported by  The main web application sits in the directory above the
module directory:

  .....\webapp\main.cgi               (imports sqlitedb)
  .....\webapp\sqlitedb\   (imports wrapper)
  .....\webapp\sqlitedb\    (imports sqlitec)

The code on 'main.cgi' contains an import: 'import sqlitedb'.
Python finds the sqlitedb python files, but can not find
They are runing Python 1.6.

How can I allow Python to see the loadable module?   It is
possible/common for the web providers to disallow import of native
code modules?

I've tried adding the following to main.cgi:

  import sys

  import sqlitedb

but that did did not fix anything.

Any ideas?   

If this works, we would be very close to having thread-safe
python-based web sites w/an sql database but without an sql server.
(Sqlite is a file-based database similar to gadfly).

More information about the Python-list mailing list