Can this be done with Ply?

6 views
Skip to first unread message

Fabián

unread,
Apr 7, 2008, 9:47:49 PM4/7/08
to ply-hack

In this site[1] there's a really cool app that generates css base on
the input xhtml.

For example, the xthml:

<html>
<body>
<div id="example">
<p>Hello word</p>
</div>
</body>
</html>

This will generate this css:
#example { }
#example p { }

My question is: is this possible to implement this thing using Ply?

I need to develop any app with a parser for a college project and I
like to *try* and do this, but it will help a lot if a knew for a fact
that this can be done with PLY.

Thanks in advance.

--
Fabián

[1] : http://lab.xms.pl/css-generator/

David Beazley

unread,
Apr 10, 2008, 8:41:57 AM4/10/08
to ply-...@googlegroups.com
Something like this could probably be done with PLY, but I'm not sure
why you'd want to do it that way. If it were me, I'd probably just
load up the xml.etree.ElementTree module and solve this problem using
that.

-Dave

Fabián

unread,
Apr 10, 2008, 10:20:08 PM4/10/08
to ply-hack
On Apr 10, 6:41 am, David Beazley <d...@dabeaz.com> wrote:
> Something like this could probably be done with PLY, but I'm not sure
> why you'd want to do it that way. If it were me, I'd probably just
> load up the xml.etree.ElementTree module and solve this problem using
> that.
>
> -Dave

Thanks a lot Dave. I'll try to think something more appropriate to do
with PLY ;-)
Reply all
Reply to author
Forward
0 new messages