uprefix /

Filename Size Date modified Message
50 B
118 B
1.5 KB
902 B
2.2 KB
1.3 KB

uprefix 0.1

The uprefix module provides an import hook for Python 3 which replaces 'u' prefixes on Unicode literal strings in Python source code.

It is intended to assist users when porting Python 2.x code to 3.x.

Requirements & Installation

The uprefix module requires Python 3.1 or greater, and can be installed with the standard Python installation procedure:

python setup.py install

There is a set of unit tests which you can invoke with

python setup.py test

before running the installation.


Once installed on the path, the import hook is invoked as follows:

>>> import uprefix
>>> uprefix.register_hook()

You can unregister the hook by

>>> uprefix.unregister_hook()

Availability & Documentation

The latest version of uprefix can be found at