471,055 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,055 software developers and data experts.

is there a python equivalent for this tool?

Dear python users, do you know of a tool like this that is written in python?

http://code.google.com/p/css-redundancy-checker/

in case you where wondering I just don't want to have the ruby
dependency on my python proyects.
Jun 27 '08 #1
1 1256
Jorge Vargas wrote:
Dear python users, do you know of a tool like this that is written in python?

http://code.google.com/p/css-redundancy-checker/

in case you where wondering I just don't want to have the ruby
dependency on my python proyects.
This comes to mind:

http://code.google.com/p/cssutils/

Not sure if it does what you want, though. If not, it should be quite trivial
to implement what you ask using this:

http://codespeak.net/lxml/cssselect.html

Algorithm: for each CSS selector in the stylesheet, check if it matches an
element in the HTML tree. If not, remove it.

Stefan
Jun 27 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

699 posts views Thread by mike420 | last post: by
226 posts views Thread by Stephen C. Waterbury | last post: by
38 posts views Thread by kbass | last post: by
7 posts views Thread by Michael Scarlett | last post: by
17 posts views Thread by mike | last post: by
5 posts views Thread by Bishara Gabriel | last post: by
36 posts views Thread by Andrea Griffini | last post: by
68 posts views Thread by Lad | last post: by
852 posts views Thread by Mark Tarver | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.