[mod_python] Module Import

Patrick Percot ppercot at free.fr
Thu Jul 1 10:39:42 EDT 2004

On Thu, 1 Jul 2004 02:48:20 -0300, "Victor Tortorello Neto" <neto at visuaw.net> wrote

> Hey!
> I  am trying  to quit  web site  development with  PHP, and  start the
> development with to mod_python. 
> I have some  experience with Python, but I can't  import a module from
> the index.py. 
> I've created a module named  'sitelib' (it's a folder with __init__.py
> with some  stuff) and  I want  to use "import  sitelib", but  it don't
> works. 
> How  can  I  import  this  module without  put  "<Directory  /www/...>
> PythonPath .... </Directory>" in httpd.conf? 

You can  put the same  directives in a  .htaccess file in  the directory
that contains your script named index.py

Groupe Morbihannais d'Utilisateurs de Logiciels Libres http://www.tuxbihan.org
Identifiant Jabber: pp at amessage.de
GPG fingerprint = 1A4F E154 3D2C A20E E4CA  A543 7951 C5C2 E44A A0B5

Patrick Percot.

More information about the Mod_python mailing list