From 4d2809c9a46ec5676f2a08457609f559d910785f Mon Sep 17 00:00:00 2001 From: Jiří Pinkava <j-pi@seznam.cz> Date: Sun, 26 Jun 2016 13:04:39 +0200 Subject: filter: replace OptionParser by ArgumentParser for gr-utils and gr-qtgui --- gr-utils/python/utils/gr_plot_fft_c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'gr-utils/python/utils/gr_plot_fft_c') diff --git a/gr-utils/python/utils/gr_plot_fft_c b/gr-utils/python/utils/gr_plot_fft_c index 43e808d95a..48d3218586 100755 --- a/gr-utils/python/utils/gr_plot_fft_c +++ b/gr-utils/python/utils/gr_plot_fft_c @@ -26,15 +26,12 @@ from gnuradio.plot_fft_base import plot_fft_base def main(): parser = plot_fft_base.setup_options() - parser.remove_option("--data-type") + parser.add_argument("-d", "--data-type", default="complex64", + choices=("complex64", )) - (options, args) = parser.parse_args () - if len(args) != 1: - parser.print_help() - raise SystemExit, 1 - filename = args[0] + args = parser.parse_args() - dc = plot_fft_base("complex64", filename, options) + dc = plot_fft_base("complex64", args.file, args) if __name__ == "__main__": try: -- cgit v1.2.3