This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

An import hook for Python 3 that removes u prefixes from Python source code before compiling it.

Project Description

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 History

Release History

This version
History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
uprefix-0.1.tar.gz (12.8 kB) Copy SHA256 Checksum SHA256 Source Apr 13, 2012

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting