On Jun 3, 11:44 am, tmallen <[EMAIL PROTECTED]> wrote:
> Is there a way to pick apart this text without resorting to regular
> expressions?
>
> p {
> color: black;
>
> }
>
> p -> element
> color -> property
> black -> value
Sure.
data = txt.strip("}").split("{")
element = data[0].strip()
it
On Jun 3, 1:44 pm, tmallen <[EMAIL PROTECTED]> wrote:
> Is there a way to pick apart this text without resorting to regular
> expressions?
>
> p {
> color: black;
>
> }
>
> p -> element
> color -> property
> black -> value
http://code.google.com/p/cssutils/
--
http://mail.python.org/mailman/l