def display_path(path):<EOL>
path = os.path.normcase(os.path.abspath(path))<EOL>if sys.version_info[<NUM_LIT:0>] == <NUM_LIT:2>:<EOL><INDENT>path = path.decode(sys.getfilesystemencoding(), '<STR_LIT:replace>')<EOL>path = path.encode(sys.getdefaultencoding(), '<STR_LIT:replace>')<EOL><DEDENT>if path.startswith(os.getcwd() + os.path.sep):<EOL><INDENT>path = '<STR_LIT:.>' + path[len(os.getcwd()):]<EOL><DEDENT>return path<EOL>
Gives the display value for a given path, making it relative to cwd
    if possible.