From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (unknown [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 66D721381FA for ; Wed, 14 May 2014 23:50:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 97B05E0A97; Wed, 14 May 2014 23:49:57 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 81A4BE0A8A for ; Wed, 14 May 2014 23:49:56 +0000 (UTC) Received: from spoonbill.gentoo.org (unknown [81.93.255.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 97F1D33FE29 for ; Wed, 14 May 2014 23:49:54 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by spoonbill.gentoo.org (Postfix) with ESMTP id 2A861182D8 for ; Wed, 14 May 2014 23:49:52 +0000 (UTC) From: "Devan Franchini" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Devan Franchini" Message-ID: <1400111231.c939413d4d3bb469d47af31ec71b7b089258ea27.twitch153@gentoo> Subject: [gentoo-commits] proj/layman:gsoc2014 commit in: layman/ X-VCS-Repository: proj/layman X-VCS-Files: layman/output.py layman/version.py X-VCS-Directories: layman/ X-VCS-Committer: twitch153 X-VCS-Committer-Name: Devan Franchini X-VCS-Revision: c939413d4d3bb469d47af31ec71b7b089258ea27 X-VCS-Branch: gsoc2014 Date: Wed, 14 May 2014 23:49:52 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: c2f3d63d-9895-4d96-b98a-6b08e2c7e9de X-Archives-Hash: 0b1e4743dd8b125aa38d358af5bf0244 commit: c939413d4d3bb469d47af31ec71b7b089258ea27 Author: Devan Franchini gentoo org> AuthorDate: Wed May 14 18:54:56 2014 +0000 Commit: Devan Franchini gentoo org> CommitDate: Wed May 14 23:47:11 2014 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=c939413d layman/{output, version}.py: Updates print() functions --- layman/output.py | 16 ++++++++-------- layman/version.py | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/layman/output.py b/layman/output.py index 48b44a1..ea98894 100644 --- a/layman/output.py +++ b/layman/output.py @@ -133,7 +133,7 @@ class Message(MessageBase): return for i in info.split('\n'): - print >> self.std_out, self.color_func('yellow', 'DEBUG: ') + i + print(self.color_func('yellow', 'DEBUG: ') + i, file=self.std_out) def notice (self, note, level = NOTE_LEVEL): @@ -141,7 +141,7 @@ class Message(MessageBase): if level > self.note_lev: return - print >> self.std_out, note + print(note, file=self.std_out) def info (self, info, level = INFO_LEVEL): @@ -153,7 +153,7 @@ class Message(MessageBase): return for i in info.split('\n'): - print >> self.std_out, " %s %s" % (self.color_func('green', '*'),i) + print(" %s %s" % (self.color_func('green', '*'),i), file=self.std_out) def status (self, message, status, info = 'ignored'): @@ -167,7 +167,7 @@ class Message(MessageBase): return for i in lines[0:-1]: - print >> self.std_out, " %s %s" % (self.color_func('green', '*'),i) + print(" %s %s" % (self.color_func('green', '*'),i), file=self.std_out) i = lines[-1] @@ -181,8 +181,8 @@ class Message(MessageBase): else: result = '[' + self.color_func('yellow', info) + ']' - print >> " %s %s %s %S" % (self.color_func('green', '*'), i, - ('.' * (58 - len(i))), result) + print(file=" %s %s %s %S" % (self.color_func('green', '*'), i, + ('.' * (58 - len(i))), result)) def warn (self, warn, level = WARN_LEVEL): @@ -194,7 +194,7 @@ class Message(MessageBase): return for i in warn.split('\n'): - print >> self.std_out, " %s %s" % (self.color_func('yellow', '*'),i) + print(" %s %s" % (self.color_func('yellow', '*'),i), file=self.std_out) def error (self, error): @@ -208,7 +208,7 @@ class Message(MessageBase): # "layman -L |& less". self.std_out.flush() self.error_out.flush() - print >> self.std_out, " %s %s" % (self.color_func('red', '*'), i) + print(" %s %s" % (self.color_func('red', '*'), i), file=self.std_out) self.std_out.flush() self.do_error_callback(error) diff --git a/layman/version.py b/layman/version.py index 90c7412..276ee86 100644 --- a/layman/version.py +++ b/layman/version.py @@ -25,4 +25,4 @@ __version__ = "$Id: version.py 309 2007-04-09 16:23:38Z wrobel $" VERSION = '2.0.0-git' if __name__ == '__main__': - print VERSION + print(VERSION)