-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstable.py
More file actions
33 lines (26 loc) · 753 Bytes
/
stable.py
File metadata and controls
33 lines (26 loc) · 753 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#! /usr/bin/env python
import string
import subprocess
import sys
import re
framework=sys.argv[1]
command="./ex_nof.sh "+framework
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=None, shell=True)
uscita = process.communicate()
## check il tempo, poi check valore uscita. "NO" se niente
in_file = open("tempo","r")
in_line=in_file.readline()
in_file.close()
tempo=float(in_line)
if tempo < 295.0:
if uscita[0].rstrip() == "[]":
print "NO"
else:
print uscita[0]
else:
command="./ex_lab.sh "+framework
process = subprocess.Popen(command, stdout=subprocess.PIPE, stderr=None, shell=True)
uscita = process.communicate()
## check il tempo, poi check valore uscita. "NO" se niente
if len(uscita[0]) > 1:
print uscita[0]