code: def pretty_filename(filename):
      '''Returns a nice human readable path to 'filename'.'''
      try:
          a = os.path.abspath(filename)
          r = os.path.relpath(filename)
      except ValueError:
          # Catch relpath exception. Happens, because it can not produce relative path
          # if wroking directory is on different drive.
          a = r = filename
      return a if '..' in r else f pretty_filename(filename):
      '''Returns a nice human readable path to 'filename'.'''
      try:
          a = os.path.abspath(filename)
          r = os.path.relpath(filename)
      except ValueError:
          # Catch relpath exception. Happens, because it can not produce relative path
          # if wroking directory is on different drive.
          a = r = filename
      return a if '..' in r else r
docs: Returns a nice human readable path to 'filename'.