handling multiple CSV files
This commit is contained in:
parent
8607c42eac
commit
c13c101ac5
@ -126,16 +126,17 @@ def manyPlanes(arguments):
|
|||||||
return samples
|
return samples
|
||||||
|
|
||||||
def writeOutputFile(filename, data):
|
def writeOutputFile(filename, data):
|
||||||
logger.info('Writing tmp.iq8s file')
|
tmpfile = '%s.tmp'%(filename)
|
||||||
SamplesFile = open('tmp.iq8s', 'wb')
|
logger.info('Writing %s file'%(tmpfile))
|
||||||
|
SamplesFile = open(tmpfile, 'wb')
|
||||||
SamplesFile.write(data)
|
SamplesFile.write(data)
|
||||||
SamplesFile.close()
|
SamplesFile.close()
|
||||||
os.system('sync')
|
os.system('sync')
|
||||||
os.system('rm %s' % (filename))
|
os.system('rm %s' % (filename))
|
||||||
logger.info('dd for file: %s' % (filename))
|
logger.info('dd for file: %s' % (filename))
|
||||||
os.system("dd if=tmp.iq8s of=%s bs=4k seek=63 > /dev/null 2>&1" % (filename))
|
os.system("dd if=%s of=%s bs=4k seek=63 > /dev/null 2>&1" % (tmpfile, filename))
|
||||||
os.system('sync')
|
os.system('sync')
|
||||||
os.system('rm tmp.iq8s')
|
os.system('rm %s'%(tmpfile))
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
global cfg
|
global cfg
|
||||||
|
Loading…
Reference in New Issue
Block a user