Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Oct 2012 02:12:02 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r241826 - head/tools/test/hwpmc
Message-ID:  <201210220212.q9M2C3pM007872@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
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()
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201210220212.q9M2C3pM007872>