PyDocs

Nav

Internet Protocols and Support

shift_path_info

wsgiref.util

function (source)
  • shift_path_info(environ)
Shift a name from PATH_INFO to SCRIPT_NAME, returning it

If there are no remaining path segments in PATH_INFO, return None.
Note: 'environ' is modified in-place; use a copy if you need to keep
the original PATH_INFO or SCRIPT_NAME.

Note: when PATH_INFO is just a '/', this returns '' and appends a trailing
'/' to SCRIPT_NAME, even though empty path segments are normally ignored,
and SCRIPT_NAME doesn't normally end in a '/'.  This is intentional
behavior, to ensure that an application can tell the difference between
'/x' and '/x/' when traversing to objects.
0 Examples
No examples for wsgiref.util/shift_path_info.
See Also
No see-alsos for wsgiref.util/shift_path_info
0 Notes
No notes for shift_path_info