Basic Python CGI library/package issue

goniners

Guest
Mar 9, 2007
2
0
0
Hi, this a newbie question, forgive me!
Ok so I have some code written using the libxml2dom package (because I want to parse html pages) and I would like to have this work on a web server. The web server (from Hostmonster) has libxml2 installed, and I put the libxml2dom package folder in my cgi-bin directory where I'm running the script. However, when I try to run the script, I get this error:

Traceback (most recent call last): File "test.py", line 5, in ? import libxml2dom File "/home/xxx/public_html/cgi-bin/libxml2dom/__init__.py", line 25, in ? from libxml2dom.macrolib import * File "/home/xxx/public_html/cgi-bin/libxml2dom/macrolib/__init__.py", line 27, in ? from libxml2dom.macrolib.macrolib import * File "/home/xxx/public_html/cgi-bin/libxml2dom/macrolib/macrolib.py", line 30, in ? from libxmlmods import libxml2mod ImportError: No module named libxmlmods


I found the libxmlmods folder inside "C:\Python25\Lib\site-packages" and tried to put that folder in "/home/xxx/public_html/cgi-bin/libxml2dom/macrolib/" but then it couldn't import libxml2mod because no file/folder of that name exists within libxml2mods.

Is this because mod_python isn't installed on the server (they said mod_python isn't installed because of security reasons)? If not, how would I get around to fixing this? Thanks in advance.
 

goniners

Guest
Mar 9, 2007
2
0
0
update***

Is this because libxml2-python bindings aren't installed on the server, even though libxml2 is? If I go into /usr/lib/python2.3/site-packages/, I don't see a libxml2 directory....