diff --git a/opppy/interactive_utils.py b/opppy/interactive_utils.py index b253e6b..005faba 100644 --- a/opppy/interactive_utils.py +++ b/opppy/interactive_utils.py @@ -250,6 +250,7 @@ def get_interactive_plot_parser(self): parser.add_argument('-p','--plot', dest='plot', help='re-open plot', nargs='?', type=bool, const=True, default=False) parser.add_argument('-l','--labels', dest='legend_labels', help='specify the legend labels [line1_label, line2_label,...]', type=str, nargs='+') parser.add_argument('-rs','--resize', dest='plot_size', help='specify the plot size [x_size, y_size]', type=float, nargs=2) + parser.add_argument('-nt','--nthreads', dest='nthreads', help='Number of threads to use during parsing', nargs='?', type=int, default=0) add_plot_options(parser) return parser diff --git a/opppy/output.py b/opppy/output.py index b90751c..8e19814 100644 --- a/opppy/output.py +++ b/opppy/output.py @@ -395,7 +395,7 @@ def thread_all(file_name, file_index, result_l): print('') print_dictionary_data(data) -def build_output_dictionary_list(file_lists, opppy_parser): +def build_output_dictionary_list(file_lists, opppy_parser, nthreads): ''' append_pickle - This function generates a opppy output dictionary @@ -412,7 +412,7 @@ def build_output_dictionary_list(file_lists, opppy_parser): # build a new dictionary data = {} data['version'] = __version__ - append_output_dictionary(data, output_files, opppy_parser) + append_output_dictionary(data, output_files, opppy_parser, nthreads=nthreads) dictionary_data.append(data) diff --git a/opppy/tally.py b/opppy/tally.py index 8a2b2d6..e2f0c0c 100644 --- a/opppy/tally.py +++ b/opppy/tally.py @@ -295,7 +295,7 @@ def thread_all(file_name, file_index, result_l): print('') print_tally_data(data) -def build_tally_dictionary_list(file_lists, opppy_parser): +def build_tally_dictionary_list(file_lists, opppy_parser, nthreads): ''' append_pickle - This function generates a opppy output dictionary @@ -312,7 +312,7 @@ def build_tally_dictionary_list(file_lists, opppy_parser): # build a new dictionary data = {} data['version'] = __version__ - append_tally_dictionary(data, output_files, opppy_parser) + append_tally_dictionary(data, output_files, opppy_parser, nthreads=nthreads) dictionary_data.append(data)