#NEWLINE# def init_routes( self , package_name , include_routes_file = True ) : #NEWLINE# #INDENT# import pkgutil , sys #NEWLINE# from whirlwind.view.decorators import route #NEWLINE# package = __import__ ( package_name ) #NEWLINE# controllers_module = sys . modules [ package_name ] #NEWLINE# prefix = ( controllers_module . __name__ + '.' ) #NEWLINE# for ( importer , modname , ispkg ) in pkgutil . iter_modules ( controllers_module . __path__ , prefix ) : #NEWLINE# #INDENT# module = __import__ ( modname ) #NEWLINE# #UNINDENT# url_routes = route . get_routes ( ) #NEWLINE# if package_name : #NEWLINE# #INDENT# from config.routes import route_list #NEWLINE# url_routes . extend ( route_list ) #NEWLINE# #UNINDENT# return url_routes