From 5e4186f426a02d2380f5d246d752aa173c5bc5c5 Mon Sep 17 00:00:00 2001 From: John Shanahan Date: Sun, 25 Aug 2013 14:29:44 -0400 Subject: [PATCH] Added Python 3 support. --- cheat | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cheat b/cheat index 6a054e3..8b86169 100755 --- a/cheat +++ b/cheat @@ -62,11 +62,11 @@ def main(): # print help if requested if keyphrase.lower() in ['', 'cheat', 'help', '-h', '-help', '--help']: - print "Usage: cheat [keyphrase]\n" - print "Available keyphrases:" + print ("Usage: cheat [keyphrase]\n") + print ("Available keyphrases:") max_command = max([len(x) for x in cheatsheets.keys()]) + 3 - print '\n'.join(sorted(['%s [%s]' % (key.ljust(max_command), value) - for key, value in cheatsheets.items()])) + print ('\n'.join(sorted(['%s [%s]' % (key.ljust(max_command), value) + for key, value in cheatsheets.items()]))) exit() # print the cheatsheet if it exists @@ -81,7 +81,7 @@ def main(): # if it does not, say so else: - print 'No cheatsheet found for %s.' % keyphrase + print ('No cheatsheet found for %s.' % keyphrase) def pretty_print(filename):