Skip to content

Commit

Permalink
Normal print(), raw_input fix
Browse files Browse the repository at this point in the history
  • Loading branch information
appi147 committed Oct 19, 2017
1 parent f54b33e commit e850aa4
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion jarviscli/CmdInterpreter.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def do_wiki(self, s):
data = wiki.content(" ".join(k[1:]))

if isinstance(data, list):
print "\nDid you mean one of these pages?\n"
print ("\nDid you mean one of these pages?\n")
for d in range(len(data)):
print(str(d + 1) + ": " + data[d])
else:
Expand Down
14 changes: 7 additions & 7 deletions jarviscli/packages/cricket.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,10 @@ def score(self):
print(Fore.RED + "\nALL MATCHES\n" + Fore.LIGHTBLUE_EX)
for i, m in enumerate(matches, 1):
print("{}. {}".format(str(i), m))
choice = int(raw_input(Fore.RED + '\nEnter choice (number): ' + Fore.RESET))
choice = int(input(Fore.RED + '\nEnter choice (number): ' + Fore.RESET))
while choice < 1 or choice > len(matches):
print(Fore.BLACK + '\nWrong choice')
choice = int(raw_input(Fore.RED + '\nEnter choice again: ' + Fore.RESET))
choice = int(input(Fore.RED + '\nEnter choice again: ' + Fore.RESET))

desc = matches[choice - 1].title()
print('')
Expand All @@ -110,29 +110,29 @@ def score(self):
print('3. Refresh Score')
print('4. Quit' + Fore.RESET)

choice = int(raw_input(Fore.RED + '\nEnter choice (number): ' + Fore.RESET))
choice = int(input(Fore.RED + '\nEnter choice (number): ' + Fore.RESET))
while choice < 1 or choice > 4:
print(Fore.BLACK + '\nWrong choice')
choice = int(raw_input(Fore.RED + '\nEnter choice again: ' + Fore.RESET))
choice = int(input(Fore.RED + '\nEnter choice again: ' + Fore.RESET))
print('')

if choice == 1:
ref = 'y'
while ref == 'y':
print(scorecard(desc))
ref = raw_input(Fore.RED + 'Do you want to refresh:(y/n) ' + Fore.RESET)
ref = input(Fore.RED + 'Do you want to refresh:(y/n) ' + Fore.RESET)
print('\n')

elif choice == 2:
ref = 'y'
while ref == 'y':
print(commentary(desc))
ref = raw_input(Fore.RED + 'Do you want to refresh:(y/n) ' + Fore.RESET)
ref = input(Fore.RED + 'Do you want to refresh:(y/n) ' + Fore.RESET)
print('\n')

elif choice == 3:
ref = 'y'
while ref == 'y':
print(live_score(desc))
ref = raw_input(Fore.RED + 'Do you want to refresh:(y/n) ' + Fore.RESET)
ref = input(Fore.RED + 'Do you want to refresh:(y/n) ' + Fore.RESET)
print('\n')
4 changes: 2 additions & 2 deletions jarviscli/packages/fb.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def get_details():
# passwords are not saved

else:
usr = raw_input('Enter Email Id: ')
usr = input('Enter Email Id: ')
pwd = getpass.getpass('Enter Password: ')
choice = raw_input('Do you want to save the id and password (y/n): ')
if choice == 'y' or choice == 'Y':
Expand Down Expand Up @@ -48,5 +48,5 @@ def fb_login(self):
submit = driver.find_element_by_id('loginbutton')
submit.click()

raw_input('Enter anything to end the session: ')
input('Enter anything to end the session: ')
driver.quit()
2 changes: 1 addition & 1 deletion jarviscli/packages/file_organise.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def print_after(path):


def file_manage(self):
dir_name = raw_input('Enter the name of directory you want to clear: ')
dir_name = input('Enter the name of directory you want to clear: ')
dir_path = source_path(dir_name)
print_before(dir_path)
new_dir_path, new_dir, extension = destination_path(dir_path)
Expand Down
8 changes: 4 additions & 4 deletions jarviscli/packages/twitter.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def get_details():
# passwords are not saved

else:
usr = raw_input('Enter Email Id: ')
usr = input('Enter Email Id: ')
pwd = getpass.getpass('Enter Password: ')
choice = raw_input('Do you want to save the id and password (y/n): ')
if choice == 'y' or choice == 'Y':
Expand Down Expand Up @@ -62,10 +62,10 @@ def twitter_tweet(self):
print("1. write tweet")
print("2. copy from clipboard")

choice = raw_input('Enter choice:')
choice = input('Enter choice:')

if int(choice) == 1:
tweet = raw_input('Enter tweet here:')
tweet = input('Enter tweet here:')
else:
tweet = pyperclip.paste()

Expand All @@ -81,5 +81,5 @@ def twitter_tweet(self):


def twitter_end(self, driver):
raw_input('Enter anything to end session: ')
input('Enter anything to end session: ')
driver.quit()

0 comments on commit e850aa4

Please sign in to comment.