def _StaticFilePathRe(url_map):
 handler_type = url_map.GetHandlerType()
 if (handler_type == 'static_files'):
  return (url_map.upload + '$')
 elif (handler_type == 'static_dir'):
  path = url_map.static_dir.rstrip(os.path.sep)
  return ((path + re.escape(os.path.sep)) + '(.*)')
 assert False, 'This property only applies to static handlers.'

def _StaticFilePathRe ( url_map ) : handler_type = url_map . GetHandlerType ( ) if ( handler_type == 'static_files' ) : return ( url_map . upload + '$' ) elif ( handler_type == 'static_dir' ) : path = url_map . static_dir . rstrip ( os . path . sep ) return ( ( path + re . escape ( os . path . sep ) ) + '(.*)' ) assert False , 'This property only applies to static handlers.'
returns a regular expression string that matches static file paths .