a | b/Scripts/Pre-Batch_run.py | ||
---|---|---|---|
1 | #-*- coding:utf-8 -*- |
||
2 | ######################### |
||
3 | # filename: run.py |
||
4 | ######################### |
||
5 | |||
6 | import subprocess |
||
7 | |||
8 | cmds = [ |
||
9 | 'python Pre_runner.py --Model "../Output_files/training.model.h5" --SNP "../Input_files/wheat599_pc95.pkl" --output ../Output_files/' |
||
10 | ] |
||
11 | |||
12 | for cmd in cmds: |
||
13 | p = subprocess.Popen( |
||
14 | cmd, shell=True, stdout=subprocess.PIPE |
||
15 | ) |
||
16 | str=p.stdout.read() |
||
17 | try: |
||
18 | print(str.decode('utf-8')) |
||
19 | except Exception: |
||
20 | print(str.decode('gbk')) |