Package concurrent_tree_crawler :: Module abstract_cmdln_navigators_creator
[hide private]
[frames] | no frames]

Source Code for Module concurrent_tree_crawler.abstract_cmdln_navigators_creator

 1  import argparse 
 2   
3 -class AbstractCmdLnNavigatorsCreator:
4 - def fill_parser(self, parser):
5 """ 6 Fill the given parser object with command-line arguments needed to 7 initialize navigators which are created in L{create} method. 8 9 @type parser: L{argparse.ArgumentParser} 10 """ 11 raise NotImplementedError()
12
13 - def create(self, args, navigators_count):
14 """ 15 Create navigators based on arguments from command-line. 16 17 @param args: result of calling the C{parser.parse_args()} function. 18 Contains results of parsing of the arguments defined in 19 L{fill_parser} method. 20 @type args: L{argparse.Namespace} 21 @param navigators_count: number of L{AbstractTreeNavigator}s to create 22 @return: navigators that will be used by the crawler threads. 23 Each navigator will be used by a single thread. 24 @rtype: list of L{AbstractTreeNavigator}s 25 """ 26 raise NotImplementedError()
27
28 - def on_exit(self):
29 """ 30 This method is called before the program exit. 31 This is the place to do some cleanup. 32 """ 33 raise NotImplementedError()
34