def guess_path(pth):
 if os.path.isabs(pth):
  return pth
 else:
  return os.path.expanduser(os.path.join('~', pth))

def guess_path ( pth ) : if os . path . isabs ( pth ) : return pth else : return os . path . expanduser ( os . path . join ( '~' , pth ) )
if the path is not absolute .