svn commit: r241826 - head/tools/test/hwpmc

Eitan Adler eadler at FreeBSD.org
Mon Oct 22 02:12:03 UTC 2012


Author: eadler
Date: Mon Oct 22 02:12:02 2012
New Revision: 241826
URL: http://svn.freebsd.org/changeset/base/241826

Log:
  Covert to python 3
  
  Approved by:	cperciva
  MFC after:	3 days

Modified:
  head/tools/test/hwpmc/pmctest.py

Modified: head/tools/test/hwpmc/pmctest.py
==============================================================================
--- head/tools/test/hwpmc/pmctest.py	Mon Oct 22 02:11:57 2012	(r241825)
+++ head/tools/test/hwpmc/pmctest.py	Mon Oct 22 02:12:02 2012	(r241826)
@@ -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()
 


More information about the svn-src-head mailing list