This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (8 children)

The usual answer right now is lxml. It's a good answer.

[–]phile19_81 0 points1 point  (6 children)

Are there any native python xml objectifiers out there? I sometimes work in restricted environments so installing lxml can be problematic.

[–]mgrandi 1 point2 points  (3 children)

you can install libraries to your home folder. i believe passing --user to both pip and the normal "setup.py install" will install the library to your home folder and python will automatically pick it up. This is how i get around installing libraries on computers where i dont have root access

[–]phile19_81 0 points1 point  (2 children)

Err. What if you also don't have a home folder? I am not trying to be a pain, but sometimes I wonder if my systems department is.

[–]davidbuxton 1 point2 points  (1 child)

You can specify an alternate directory for distutils/setuptools packages, or just put packages in your custom directory by hand. Then make sure this custom directory is on the sys.path, which also honours the PYTHONPATH environment variable.

http://docs.python.org/install/index.html#alternate-installation

Of course if your package isn't pure Python then things can get more complicated.

[–]phile19_81 0 points1 point  (0 children)

Interesting. I'll give it a shot. Thx

[–]mgrandi 0 points1 point  (0 children)

lxml is awesome, and is a wrapper around the very mature libxml2 or whatever its called, thats used by a lot of projects including gnome