From 9d34cdb76ac623507e7a6b1d53967249af7396bc Mon Sep 17 00:00:00 2001 From: Anne de Jong Date: Sun, 22 Feb 2015 22:20:52 +0100 Subject: [PATCH] Improved interface --- run.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/run.py b/run.py index 0a03cdb..2070743 100755 --- a/run.py +++ b/run.py @@ -1,12 +1,5 @@ #!/usr/bin/python -if(!os.path.isfile('timedomaineuler.py')): - os.system('cmake . && make') -from timedomaineuler import * - -from numpy import * -import os -import sys from argparse import ArgumentParser import argparse @@ -29,6 +22,14 @@ parser.add_argument('-p','--periods',type=float,dest="periods", default=10,help="Periods to compute") args=parser.parse_args() +import os,sys +if not os.path.isfile('timedomaineuler.py'): + os.system('cmake . && make') +from timedomaineuler import * + +from numpy import * + + globals().update(vars(args)) #Put options in global namespace print("Frequency:",f)