comparison snippy_core_wrapper.py @ 11:502763099477 draft

planemo upload for repository https://github.com/tseemann/snippy commit 31630035ea98db0cdd0dff0951ef482955f48c52-dirty
author dfornika
date Mon, 21 Jan 2019 19:42:22 -0500
parents 9d46ea31b273
children a2f07b210776
comparison
equal deleted inserted replaced
10:9d46ea31b273 11:502763099477
30 for indir in args.indirs.split(','): 30 for indir in args.indirs.split(','):
31 base_name = os.path.basename(indir) 31 base_name = os.path.basename(indir)
32 sys.stderr.write(indir + '\n') 32 sys.stderr.write(indir + '\n')
33 copyfile(indir, base_name) 33 copyfile(indir, base_name)
34 sys.stderr.write('\n'.join([indir, base_name]) + '\n') 34 sys.stderr.write('\n'.join([indir, base_name]) + '\n')
35 subprocess.run(['tar', '-xf', base_name]) 35 subprocess.Popen(['tar', '-xf', base_name])
36 36
37 extracted_dirs = [f.path for f in os.scandir() if f.is_dir() ] 37 extracted_dirs = [f.path for f in os.listdir('.') if f.is_dir() ]
38 38
39 for extracted_dir in extracted_dirs: 39 for extracted_dir in extracted_dirs:
40 snippy_core_command_line.append(extracted_dir) 40 snippy_core_command_line.append(extracted_dir)
41 41
42 print(snippy_core_command_line) 42 print(snippy_core_command_line)
43 subprocess.run(snippy_core_command_line) 43 subprocess.Popen(snippy_core_command_line)
44 44
45 if __name__ == '__main__': 45 if __name__ == '__main__':
46 main() 46 main()