Wrapped some more parenthesis around print statements to retain compatibility with Python 3.3.

This commit is contained in:
Chris Lane 2013-08-26 20:16:43 -04:00
parent 63c391f67a
commit cdc2b8ee4d

6
cheat
View file

@ -49,7 +49,7 @@ def cheat_files(cheat_directories):
def edit_cheatsheet(cheat, cheatsheets): def edit_cheatsheet(cheat, cheatsheets):
"Edit a pre-existing cheatsheet." "Edit a pre-existing cheatsheet."
if cheat not in cheatsheets: if cheat not in cheatsheets:
print 'No cheatsheet found for "%s"' % cheat print ('No cheatsheet found for "%s"' % cheat)
ans = raw_input('Create cheatsheet for "%s" (Y/N)? ' % cheat) ans = raw_input('Create cheatsheet for "%s" (Y/N)? ' % cheat)
if ans.lower() in ['y', 'yes']: if ans.lower() in ['y', 'yes']:
create_cheatsheet(cheat, cheatsheets) create_cheatsheet(cheat, cheatsheets)
@ -63,7 +63,7 @@ def edit_cheatsheet(cheat, cheatsheets):
def create_cheatsheet(cheat, cheatsheets): def create_cheatsheet(cheat, cheatsheets):
"Create a new cheatsheet." "Create a new cheatsheet."
if cheat in cheatsheets: if cheat in cheatsheets:
print 'Cheatsheet "%s" already exists' % cheat print ('Cheatsheet "%s" already exists' % cheat)
exit() exit()
import cheatsheets as cs import cheatsheets as cs
@ -115,7 +115,7 @@ def main():
'EDITOR environment variable to your favorite editor\'s path') 'EDITOR environment variable to your favorite editor\'s path')
exit() exit()
elif len(sys.argv) < 3: elif len(sys.argv) < 3:
print 'Must provide a cheatsheet to edit/create' print ('Must provide a cheatsheet to edit/create')
exit() exit()
# if the user wants to edit a cheatsheet # if the user wants to edit a cheatsheet