comparison call_amr_mutations.py @ 5:bafbed02fdd2 draft

Uploaded
author greg
date Tue, 21 Mar 2023 19:35:08 +0000
parents 30b17a17c1aa
children 0a4835bee6a6
comparison
equal deleted inserted replaced
4:2774bdf30122 5:bafbed02fdd2
7 import re 7 import re
8 import subprocess 8 import subprocess
9 import sys 9 import sys
10 10
11 11
12 def run_command(self, command): 12 def run_command(command):
13 try: 13 try:
14 return re.split('\\n', subprocess.check_output(command, shell=True).decode('utf-8')) 14 return re.split('\\n', subprocess.check_output(command, shell=True).decode('utf-8'))
15 except Exception: 15 except Exception:
16 message = 'Command %s failed: exiting...' % command 16 message = 'Command %s failed: exiting...' % command
17 sys.exit(message) 17 sys.exit(message)