def splitPathInfo(pathinfo):
 if (pathinfo == '/'):
  return (None, None, None)
 if _pathinfo_pat.match((pathinfo or '')):
  path = _pathinfo_pat.match(pathinfo)
  (layer, row, column, zoom, extension) = [path.group(p) for p in 'lyxze']
  coord = Coordinate(int(row), int(column), int(zoom))
 elif _preview_pat.match((pathinfo or '')):
  path = _preview_pat.match(pathinfo)
  (layer, extension) = (path.group('l'), 'html')
  coord = None
 else:
  raise Core.KnownUnknown(('Bad path: "%s". I was expecting something more like "/example/0/0/0.png"' % pathinfo))
 return (layer, coord, extension)

def splitPathInfo ( pathinfo ) : if ( pathinfo == '/' ) : return ( None , None , None ) if _pathinfo_pat . match ( ( pathinfo or '' ) ) : path = _pathinfo_pat . match ( pathinfo ) ( layer , row , column , zoom , extension ) = [ path . group ( p ) for p in 'lyxze' ] coord = Coordinate ( int ( row ) , int ( column ) , int ( zoom ) ) elif _preview_pat . match ( ( pathinfo or '' ) ) : path = _preview_pat . match ( pathinfo ) ( layer , extension ) = ( path . group ( 'l' ) , 'html' ) coord = None else : raise Core . KnownUnknown ( ( 'Bad path: "%s". I was expecting something more like "/example/0/0/0.png"' % pathinfo ) ) return ( layer , coord , extension )
converts a path_info string to layer name .