y of the tags) is grouped along with the tag. One
can dhen optionally add the <...> stuff at the end. (Not sure if that
would be my preferred syntax for it, but I won't complain as much
about that as about the empty '<>' thing :)
--
Magnus Lie Hetland "The early b
n can be found at
http://hetland.org/writing/beginning-python
Thanks,
- Magnus
--
Magnus Lie Hetland"Preparing to stand by."
http://hetland.org-- Microsoft Windows
--
http://mail.python.org/mailman/listinfo/python-list
out also has an effect.
--
Magnus Lie Hetland"Preparing to stand by."
http://hetland.org-- Microsoft Windows
--
http://mail.python.org/mailman/listinfo/python-list
se P.C. levels... ;)
--
Magnus Lie HetlandFall seven times, stand up eight
http://hetland.org [Japanese proverb]
--
http://mail.python.org/mailman/listinfo/python-list
d from
>any other sax handler?)
What I ended up doing was using an SGML parser (sgmlop) instead. It's
highly forgiving (even of illegal entities and the like) but gives me
the information I need. Might be worth a look in your app too?
>Toby
--
Magnus Lie Hetland
http://hetland.org
--
http:/
bject for such special calls -- and thus uses object.__call__
instead, which (obviously) instantiates the class just like we want it
to.
So: The scenario needn't be as complex as in your example, as long as
you use instances instead of classes as protocols.
(I guess the case could be made for
ess that it does not work with the new version of PEP 246.
Why not? There's nothing wrong with classes (or anything else) being
protocols...? AFAIK, the current version of the PEP was specifically
rewritten in order to fit the BDFL blog (as stated in the PEP).
[snip]
I don't q
Unicode character) -- is it
possible to ignore it (or replace it, as with encode/decode)? I'm
trying to write a parser that will accept *any* input text without
complaining -- but simply trapping this exception would seem to
disrupt the parsing process...
Thanks,
- Magnus
--
Magnus Lie Hetla
In article <[EMAIL PROTECTED]>,
Fredrik Lundh wrote:
>Magnus Lie Hetland wrote:
[snip]
>with sgmlop 1.1, the following script
>
>class entity_handler:
>def handle_entityref(self, entityref):
>print "ENTITY", repr(entityref)
>
>parser = sgmlop.XML
PyXML.)
> I'm pretty sure they've forked the code (there's no UnicodeParser in
> the effbot.org edition),
Does it deal with Unicode at all? I.e., can I, for example, feed it a
Unicode object?
> and I have no idea how things work in the fork.
I see.
--
Magnus Lie Hetland
in that at the
moment)? Using UTF-8 or something would be completely acceptable to
me, as long as it works. (Maybe simply feeding it UTF-8 strings would
work as it is? Except for Unicode charrefs, of course... Or?)
- M
--
Magnus Lie Hetland Time flies like the wind. Fruit flies
efinitely* use these.
Hot 100% sure about the names, though. (add() and append() seem like
more natural names -- but they may be confusing, considering their
other uses...)
+1 on both (possibly allowing for some naming discussion...)
--
Magnus Lie Hetland Time flies like the win
Just a quick question: Does anyone have a simple way of finding the
positions (start, end) of the groups in a regexp match? AFAICS, the re
API can only return the contents...?
--
Magnus Lie HetlandFall seven times, stand up eight
http://hetland.org
In article <[EMAIL PROTECTED]>, Tim
Peters wrote:
>[Magnus Lie Hetland]
>> Just a quick question: Does anyone have a simple way of finding the
>> positions (start, end) of the groups in a regexp match? AFAICS, the re
>> API can only return the contents...?
>
>Rea
ss I was
standing in that very directory when compiling; maybe there's some
mix-up there?
--
Magnus Lie HetlandFall seven times, stand up eight
http://hetland.org [Japanese proverb]
--
http://mail.python.org/mailman/listinfo/python-list
15 matches
Mail list logo