From owner-svn-src-head@FreeBSD.ORG Mon May 13 19:53:20 2013 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 4A035EA3; Mon, 13 May 2013 19:53:20 +0000 (UTC) (envelope-from hiren@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3C310753; Mon, 13 May 2013 19:53:20 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.6/8.14.6) with ESMTP id r4DJrKa4062789; Mon, 13 May 2013 19:53:20 GMT (envelope-from hiren@svn.freebsd.org) Received: (from hiren@localhost) by svn.freebsd.org (8.14.6/8.14.5/Submit) id r4DJrKSx062788; Mon, 13 May 2013 19:53:20 GMT (envelope-from hiren@svn.freebsd.org) Message-Id: <201305131953.r4DJrKSx062788@svn.freebsd.org> From: Hiren Panchasara Date: Mon, 13 May 2013 19:53:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r250612 - head/tools/test/hwpmc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 May 2013 19:53:20 -0000 Author: hiren Date: Mon May 13 19:53:19 2013 New Revision: 250612 URL: http://svnweb.freebsd.org/changeset/base/250612 Log: As python3 does not have raw_input(), convert it to input() when we are using python3. PR: 177214 Reviewed by: gnn Approved by: sbruno (mentor) Modified: head/tools/test/hwpmc/pmctest.py Modified: head/tools/test/hwpmc/pmctest.py ============================================================================== --- head/tools/test/hwpmc/pmctest.py Mon May 13 19:52:35 2013 (r250611) +++ head/tools/test/hwpmc/pmctest.py Mon May 13 19:53:19 2013 (r250612) @@ -51,6 +51,10 @@ import sys import subprocess from subprocess import PIPE +# Use input() for Python version 3 +if sys.version_info[0] == 3: + raw_input = input + # A list of strings that are not really counters, just # name tags that are output by pmccontrol -L notcounter = ["IAF", "IAP", "TSC", "UNC", "UCF", "UCP", "SOFT" ] @@ -87,7 +91,7 @@ def main(): print(result) if (options.wait == True): try: - value = input("next?") + value = raw_input("next?") except EOFError: sys.exit()