NUKnightLab / learncms

Learn.Knightlab.com CMS version
8 stars 5 forks source link

This code is probably awful. But it works. #68

Closed duner closed 9 years ago

duner commented 9 years ago

LXML is bad.

scott2b commented 9 years ago

Why is lxml bad? lxml is awesome. It can be a pita to manage as a dependency sometimes, but since we are using configuration management, this should really be a non-issue. I don't really see anybody offering up a strong alternative to lxml.

JoeGermuska commented 9 years ago

Guessing it's more a distaste for xpath expressions, but I can't speak for @duner. It's also the case that a lot of the time the raw DOM API is just ugly, and it would be nice to do things more pythonically, but… ¯\ (ツ)

scott2b commented 9 years ago

Ah ok. I guess most of my love for lxml comes from using with cssselect, which is pretty much exclusively how I tend to use it. If you are just doing xml parsing and dom manipulation, then I suppose there are in fact other options. But if it works ....

duner commented 9 years ago

Maybe it's not that lxml is bad, I just found it to be poorly documented, so I was kinda flailing a bit trying to get it to do what I'm trying to do. I'm used to Beautiful Soup (though I guess that only does DOM parsing, not manipulation).

duner commented 9 years ago

Anyway, @JoeGermuska, can I go ahead and pull this into master?

JoeGermuska commented 9 years ago

no sir, i'll take care of that ;)