Package concurrent_tree_crawler :: Package html_multipage_navigator :: Package cmdln :: Module abstract_levels_creator
[hide private]
[frames] | no frames]

Source Code for Module concurrent_tree_crawler.html_multipage_navigator.cmdln.abstract_levels_creator

 1  import argparse 
 2  from concurrent_tree_crawler.html_multipage_navigator.sample_page_analyzer import LevelsCreator 
 3   
4 -class AbstractCmdLnLevelsCreator:
5 - def fill_parser(self, parser):
6 """ 7 Fill the given parser object with command-line arguments needed to 8 initialize levels creator returned in L{create} method. 9 10 @type parser: L{argparse.ArgumentParser} 11 """ 12 pass
13
14 - def create(self, args):
15 """ 16 Create L{AbstractLevelsCreator} based on command line arguments. 17 18 @param args: result of calling the C{parser.parse_args()} function. 19 Contains result of parsing the arguments defined in L{fill_parser} 20 method. 21 @type args: L{argparse.Namespace} 22 @rtype: L{AbstractLevelsCreator} 23 """ 24 raise NotImplementedError()
25
26 - def on_exit(self):
27 """ 28 This method is called before the program exit. 29 This is the place to execute some cleanup actions. 30 """ 31 pass
32