| tfix arguments - slidergrid - grid of elastic sliders on a frictional surface | |
| git clone git://src.adamsgaard.dk/slidergrid | |
| Log | |
| Files | |
| Refs | |
| README | |
| LICENSE | |
| --- | |
| commit 9d76534f6962e6b8b06c3fed5b277320b834e056 | |
| parent 94f9fb9eafe08a8193268b2375418756a34d8dbb | |
| Author: Anders Damsgaard <[email protected]> | |
| Date: Wed, 30 Mar 2016 14:25:20 -0700 | |
| fix arguments | |
| Diffstat: | |
| M postprocessing.py | 19 +++++++++++-------- | |
| 1 file changed, 11 insertions(+), 8 deletions(-) | |
| --- | |
| diff --git a/postprocessing.py b/postprocessing.py | |
| t@@ -13,10 +13,10 @@ def print_usage(): | |
| print('usage: ' + SCRIPTNAME + ' [OPTIONS] <FOLDER1> [FOLDER2, ...]') | |
| print('where FOLDER is an output folder placed in this directory') | |
| print('options:') | |
| - print(' -h, --help show this information') | |
| - print(' -v, --version show version information') | |
| - print(' -ps, --plot-sliders plot slider positions') | |
| - print(' -pk, --plot-kinetic-energy plot slider positions') | |
| + print(' -h, --help show this information') | |
| + print(' -v, --version show version information') | |
| + print(' -s, --plot-sliders plot slider positions') | |
| + print(' -k, --plot-kinetic-energy plot slider positions') | |
| def print_version(): | |
| t@@ -140,8 +140,11 @@ def main(argv): | |
| plot_sliders = False | |
| plot_kinetic_energy = False | |
| try: | |
| - opts, args = getopt.getopt(argv, 'hvs', | |
| - ['help', 'version', 'plot-sliders']) | |
| + opts, args = getopt.getopt(argv, 'hvsk', | |
| + ['help', | |
| + 'version', | |
| + 'plot-sliders', | |
| + 'plot-kinetic-energy']) | |
| except getopt.GetoptError: | |
| # print_usage() | |
| # sys.exit(2) | |
| t@@ -156,10 +159,10 @@ def main(argv): | |
| print_version() | |
| sys.exit(0) | |
| - elif opt in ('-ps', '--plot-sliders'): | |
| + elif opt in ('-s', '--plot-sliders'): | |
| plot_sliders = True | |
| - elif opt in ('-pk', '--plot-kinetic-energy'): | |
| + elif opt in ('-k', '--plot-kinetic-energy'): | |
| plot_kinetic_energy = True | |
| for arg in args: |