Covert to python 3

Approved by:	cperciva
MFC after:	3 days
This commit is contained in:
Eitan Adler 2012-10-22 02:12:02 +00:00
parent 0b80c1e400
commit 168ff9ab82

View File

@ -68,14 +68,14 @@ def main():
(options, args) = parser.parse_args()
if (options.program == None):
print "specify program, such as ls, with -p/--program"
print("specify program, such as ls, with -p/--program")
sys.exit()
p = subprocess.Popen(["pmccontrol", "-L"], stdout=PIPE)
counters = p.communicate()[0]
if len(counters) <= 0:
print "no counters found"
print("no counters found")
sys.exit()
for counter in counters.split():
@ -84,10 +84,10 @@ def main():
p = subprocess.Popen(["pmcstat", "-p", counter, options.program],
stdout=PIPE)
result = p.communicate()[0]
print result
print(result)
if (options.wait == True):
try:
value = raw_input("next?")
value = input("next?")
except EOFError:
sys.exit()