From ac0525e6418da4e5e0f70483a4eea61ffe41b589 Mon Sep 17 00:00:00 2001 From: Adrian Croucher Date: Fri, 5 Jun 2015 13:52:18 +1200 Subject: [PATCH] Altered temporary run file name in t2data run()- fixes issue #10. --- t2data.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/t2data.py b/t2data.py index ff966193..15828ab4 100755 --- a/t2data.py +++ b/t2data.py @@ -291,7 +291,7 @@ def run(self,save_filename='',incon_filename='',simulator='AUTOUGH2_2',silent=Fa they are constructed by changing the extensions of the data filename. Set silent to True to suppress screen output.""" if self.filename: - from os.path import splitext + from os.path import splitext, basename from os import devnull,system,remove datbase,ext=splitext(self.filename) if (self.type=='AUTOUGH2'): @@ -300,7 +300,7 @@ def run(self,save_filename='',incon_filename='',simulator='AUTOUGH2_2',silent=Fa savebase,ext=splitext(save_filename) inconbase,ext=splitext(incon_filename) # write a file containing the filenames, to pipe into AUTOUGH2: - runfilename=simulator+'_input.dat' + runfilename = datbase + '_' + basename(simulator) + '.in' f=open(runfilename,'w') f.write(savebase+'\n') f.write(inconbase+'\n')