Improved interface

This commit is contained in:
Anne de Jong 2015-02-22 22:20:52 +01:00
parent b910655fed
commit 9d34cdb76a

15
run.py
View File

@ -1,12 +1,5 @@
#!/usr/bin/python #!/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 from argparse import ArgumentParser
import argparse import argparse
@ -29,6 +22,14 @@ parser.add_argument('-p','--periods',type=float,dest="periods",
default=10,help="Periods to compute") default=10,help="Periods to compute")
args=parser.parse_args() 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 globals().update(vars(args)) #Put options in global namespace
print("Frequency:",f) print("Frequency:",f)