PEP263 (Specifying encoding) and bytecode strings

Tony Meyer ta-meyer at ihug.co.nz
Mon May 5 02:56:34 EDT 2003


As per PEP 0263 [1], Python 2.3b1 gives out a depreciation warning if
non-ascii chars are used and there isn't a specific encoding on the
file.

Is there some way to specify that all strings are bytecodes, and not
encoded characters?

The specific application here is resourcepackage [2].  For those not
familiar with it, it converts non-Python files (html, jpg, whatever)
into a Python module that can be imported and used.  The module is
basically a zlib compressed string, and this string ends up with
characters that the interpreter thinks are meant to be encoded chars.

TIA.

=Tony Meyer

[1] http://www.python.org/peps/pep-0263.html
[2] http://sf.net/projects/resourcepackage






More information about the Python-list mailing list