10
0
mirror of https://gitlab.com/scemama/EZFIO.git synced 2024-12-22 12:23:34 +01:00

Fixed ezfio set in bash for strings

This commit is contained in:
Anthony Scemama 2019-01-04 18:16:14 +01:00
parent 93cfb0ec92
commit 658a9e3132
2 changed files with 6 additions and 3 deletions

View File

@ -55,8 +55,11 @@ def main():
return 0 return 0
elif command.startswith('set'): elif command.startswith('set'):
text = sys.stdin.read()
try: try:
data = eval(sys.stdin.read()) data = eval(text)
except NameError:
data = text
except: except:
print "Syntax Error" print "Syntax Error"
return 1 return 1

View File

@ -172,7 +172,7 @@ subroutine ezfio_write_%(type_short)s(dir,fil,dat)
open(unit=libezfio_iunit,file=l_filename(1),form='FORMATTED',action='WRITE') open(unit=libezfio_iunit,file=l_filename(1),form='FORMATTED',action='WRITE')
write(libezfio_iunit,%(fmt)s) dat write(libezfio_iunit,%(fmt)s) dat
close(libezfio_iunit) close(libezfio_iunit)
call system( 'mv -f '//trim(l_filename(1))//' '//trim(l_filename(2)) ) call rename(trim(l_filename(1)),trim(l_filename(2)) )
end end
subroutine ezfio_read_array_%(type_short)s(dir,fil,rank,dims,dim_max,dat) subroutine ezfio_read_array_%(type_short)s(dir,fil,rank,dims,dim_max,dat)
@ -268,7 +268,7 @@ subroutine ezfio_write_array_%(type_short)s(dir,fil,rank,dims,dim_max,dat)
call libezfio_closez(trim(l_filename(1)),'w') call libezfio_closez(trim(l_filename(1)),'w')
deallocate(buffer) deallocate(buffer)
endif endif
call system( 'mv -f '//trim(l_filename(1))//' '//trim(l_filename(2)) ) call rename(trim(l_filename(1)),trim(l_filename(2)) )
end end
""" """