<s> import os <EOL> import logging <EOL> import web <EOL> logging . getLogger ( "<STR_LIT>" ) . setLevel ( logging . DEBUG ) <EOL> def get_page_file_list_by_req_path ( folder_pages_full_path , req_path , sort_by_modified_ts = False , max_depth = None , limit = None ) : <EOL> if req_path in ( "<STR_LIT>" , "<STR_LIT>" ) : <EOL> path = "<STR_LIT:.>" <EOL> else : <EOL> path = web . utils . strips ( req_path , "<STR_LIT:/>" ) <EOL> if max_depth is None : <EOL> cmd = "<STR_LIT>" % ( folder_pages_full_path , path ) <EOL> else : <EOL> cmd = "<STR_LIT>" % ( folder_pages_full_path , path , max_depth ) <EOL> cmd += "<STR_LIT>" <EOL> if sort_by_modified_ts : <EOL> cmd += "<STR_LIT>" <EOL> if limit is not None : <EOL> cmd += "<STR_LIT>" % limit <EOL> logging . info ( cmd ) <EOL> buf = os . popen ( cmd ) . read ( ) . strip ( ) <EOL> return buf </s>
