summaryrefslogtreecommitdiff
path: root/gnuradio-runtime/examples/mp-sched/plot_flops.py
diff options
context:
space:
mode:
authorSebastian Koslowski <koslowski@kit.edu>2016-06-10 15:15:16 +0200
committerSebastian Koslowski <koslowski@kit.edu>2016-07-13 16:30:36 +0200
commit893b74c770b81f2c09094577e2de720155f84b61 (patch)
treece430f554cf032c70eab8a95228731afbffc6efd /gnuradio-runtime/examples/mp-sched/plot_flops.py
parent7ac7cf6246e4d984d36c64df10ba4d2b2f6b2204 (diff)
parent6fb0ff274a05daf2f2677af14337704fb88081f7 (diff)
Merge remote-tracking branch 'grcwg/next_grcwg' into gtk3
Diffstat (limited to 'gnuradio-runtime/examples/mp-sched/plot_flops.py')
-rwxr-xr-xgnuradio-runtime/examples/mp-sched/plot_flops.py15
1 files changed, 6 insertions, 9 deletions
diff --git a/gnuradio-runtime/examples/mp-sched/plot_flops.py b/gnuradio-runtime/examples/mp-sched/plot_flops.py
index d9d810ae2f..c80820b8a3 100755
--- a/gnuradio-runtime/examples/mp-sched/plot_flops.py
+++ b/gnuradio-runtime/examples/mp-sched/plot_flops.py
@@ -28,7 +28,7 @@ import re
import sys
import os
import tempfile
-from optparse import OptionParser
+from argparse import ArgumentParser
def parse_file(input_filename, output):
@@ -84,14 +84,11 @@ def handle_file(input_filename):
def main():
- usage = "usage: %prog [options] file.dat"
- parser = OptionParser(usage=usage)
- (options, args) = parser.parse_args()
- if len(args) != 1:
- parser.print_help()
- raise SystemExit, 1
-
- handle_file(args[0])
+ parser = ArgumentParser()
+ parser.add_argument('file', help='Input file', nargs=1)
+ args = parser.parse_args()
+
+ handle_file(args.file[0])
if __name__ == '__main__':