[Zope-dev] whitespace filtering corner case in doctest
Reinout van Rees
reinout at vanrees.org
Wed Sep 16 14:21:01 EDT 2009
On 2009-09-16, Marius Gedminas <marius at gedmin.as> wrote:
>
>> > On Mon, Aug 17, 2009 at 02:46:46PM +0000, Reinout van Rees wrote:
>> >> In some cases, importing readline can result in the escape code
>> >> ^[[?1034h=3D to be send ("8bit on").
>> >
>
> ASCII and defines which characters are printable and which ones are
> control characters. Maybe \x9b poses a bit of a problem, since it's an
> escape character for some terminals, but a real character on some legacy
> 8bit charsets. (It's not allowed in UTF-8 sequences.)
>
> Or perhaps you mean it may make it difficult to distinguish a test
> printing \x1b from a test printing ^ followed by [ (assuming that's the
> visualisation chosen for control characters). That is an issue.
Just for posterity, in the end I solved it with a custom normalizer:
checker = renormalizing.RENormalizing([
(re.compile(r'.*1034h'), ''),
])
Reinout
--
Reinout van Rees - reinout at vanrees.org - http://reinout.vanrees.org
Software developer at http://www.thehealthagency.com
"Military engineers build missiles. Civil engineers build targets"
More information about the Zope-Dev
mailing list