durusmail: quixote-users: Call for help
Call for help
2007-01-21
2007-01-21
Re: Call for help
2007-01-30
2007-01-21
2007-01-30
2007-01-30
2007-01-30
2007-01-30
2007-02-01
2007-02-01
2007-02-01
2007-02-02
2007-02-02
2007-02-02
2007-02-02
2007-02-02
2007-02-03
Re: Call for help
2007-02-06
Re: Call for help
2007-02-05
2007-01-30
Call for help
Mike Orr
2007-02-02
On 2/1/07, Titus Brown  wrote:
> On Thu, Feb 01, 2007 at 12:01:54PM -0800, Mike Orr wrote:
> -> So how about inlining the code into htmltext itself?
>
> Guys,
>
> I'm happy to try this, but I need some concrete examples of where
> htmltext fails and qpy succeeds, preferably expressed in Python
> code.  That way I can put in some tests ;).

>>> from quixote.html import htmltext
>>> x = htmltext("Some string.")
>>> assert isinstance(x, basestring)
AssertionError
>>> "".join(["ABC", x])
TypeError: sequence item 1: expected string, htmltext found
>>> from qpy import u8
>>> y = h8("Some string.")
>>> assert isinstance(y, basestring)
>>> "".join(["ABC", y])
u'ABCSome string.'

I can't quite capture the Unicode problem.

>>> unicode(htmltext(U'\xa9')
u'\xa9'
>>> unicode(htmltext('\xa9'))
UnicodeDecodeError: 'ascii' codec can't decode byte 0xa9 in position
0: ordinal not in range(128)

But that in itself is not strictly htmltext's fault.  Maybe the
previous tests are enough.

--
Mike Orr 
reply