Skip to content

Commit

Permalink
corrected bug with python2 input
Browse files Browse the repository at this point in the history
  • Loading branch information
bonfus committed May 30, 2016
1 parent e3b7b85 commit bf3e1c0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion muesr/core/ninput.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@ def ninput(message,parser = None):
Nice input function
"""
try:
choice = input('\t ' + message )
choice = ""
if sys.version_info >= (3,0):
choice = input('\t ' + message )
else:
choice = raw_input('\t ' + message )
#readline.remove_history_item(readline.get_current_history_length()-1)
if parser:
choice = parser(choice)
Expand Down

0 comments on commit bf3e1c0

Please sign in to comment.