[Pythonmac-SIG] MacPy 2.1: re module error in IDE

Just van Rossum just@letterror.com
Mon, 2 Jul 2001 11:07:20 +0200


Damon Butler wrote:

> TypeError: pcre_compile() argument 1 must be string without null bytes, not
> string

Ah, this seems due to the conversion from regex to re. Apparently, sre allows
null bytes in pattern strings, but pre doesnt :-(. As a workaround, you could
patch PyFontify:

import re

becomes:

import sre
re = sre

Hope this helps,

Just