Skip to main content

The uprefix module provides an import hook for Python 3 which removes ‘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.

There’s no separate documentation - all you need is given below.

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.

Usage

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()

The latest version of uprefix can be found at

https://bitbucket.org/vinay.sajip/uprefix/

Release files for uprefix 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for uprefix 0.1
File Size Uploaded
uprefix-0.1.tar.gz 12.8 kB Details

Release files / uprefix-0.1.tar.gz

Download URL uprefix-0.1.tar.gz
Size 12.8 kB
Tags Source
SHA-256 checksum
How to use checksums
6020d025e92a8513fc4c117ebdfe47294aed530b887c4b43115d9ae3f2ac1cf2
BLAKE2b-256 checksum
How to use checksums
d0e414c293c7f46921df4d69a4310731ef1ca970db7a2a676a9d929c1caa0871
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.1 This release

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page