put prefix in front of the filename, not the directory name

This commit is contained in:
Christoph Kords 2012-08-03 13:14:51 +00:00
parent 948d9c03d0
commit 4cfc302cdd
1 changed files with 1 additions and 1 deletions

View File

@ -80,7 +80,7 @@ if filenames == []:
else:
for name in filenames:
if os.path.exists(name):
files.append({'name':name, 'input':open(name), 'output':open(prefix+'_'+name,'w')})
files.append({'name':name, 'input':open(name), 'output':open(os.path.dirname(name)+os.sep+prefix+'_'+os.path.basename(name),'w')})
# ------------------------------------------ loop over input files ---------------------------------------