def get_page_context_from_template(path):
 for app in frappe.get_installed_apps(frappe_last=True):
  app_path = frappe.get_app_path(app)
  folders = (frappe.local.flags.web_pages_folders or (u'www', u'templates/pages'))
  for start in folders:
   search_path = os.path.join(app_path, start, path)
   options = (search_path, (search_path + u'.html'), (search_path + u'.md'), (search_path + u'/index.html'), (search_path + u'/index.md'))
   for o in options:
    if (os.path.exists(o) and (not os.path.isdir(o))):
     return get_page_info(o, app, app_path=app_path)
 return None

def get_page_context_from_template ( path ) : for app in frappe . get_installed_apps ( frappe_last = True ) : app_path = frappe . get_app_path ( app ) folders = ( frappe . local . flags . web_pages_folders or ( u'www' , u'templates/pages' ) ) for start in folders : search_path = os . path . join ( app_path , start , path ) options = ( search_path , ( search_path + u'.html' ) , ( search_path + u'.md' ) , ( search_path + u'/index.html' ) , ( search_path + u'/index.md' ) ) for o in options : if ( os . path . exists ( o ) and ( not os . path . isdir ( o ) ) ) : return get_page_info ( o , app , app_path = app_path ) return None
return page_info from path .