[Web-SIG] PEP3333 and PATH_INFO
chrism at plope.com
Tue Jan 3 11:52:36 CET 2012
Perrenial topic, it seems, from the archives.
As far as I can tell from PEP 3333, every WSGI application that wants to
run on both Python 2 and Python 3 and which uses PATH_INFO will need to
define a helper function something like this:
def decode_path_info(environ, encoding='utf-8'):
PY3 = sys.version_info == 3
path_info = environ['PATH_INFO']
Is there a more elegant way to handle this?
More information about the Web-SIG