Dear group,

I have a problem with importing MySQLdb in a cgi-script.
The code fragment at the beginning:

  1 #!/usr/bin/env python
      2
      3 print "Content-Type: text/html\n\n"
      4
      5 import re
      6 import cgi
      7 import MySQLdb
8 print "something"

but the print statement in line 8 will never be executed. The Apache error log says:
"No module named MySQLdb, referer: http://localhost/sqlForm.html"

But when executing the import statement outside of an cgi-script, for example at the command line, the import works fine.
I assume, it has something to do with the apache. Why does the python interpreter not find the MySQLdb module when executed in
apache context?

thanks, roebi
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to