cause for python 3.4.3 IDLE and windows shell input() inconsistencies? -


i running python program windows command prompt (windows 8.1, python 3.4.3 64-bit). in troubleshooting why input() not working me same in idle in cmd.exe discovered while idle handling result input() correctly (i.e. str type), cmd.exe processes input incorrectly. specifically, cmd.exe stores value according type given: number stored int type, or float type if float given, string without quotations raises nameerror, , quotations value stored str stype. there valid reason why cmd.exe incorrectly handling input(). tester program used see myself below.

def input_tester():     x = input("input: ")         print(x, type(x)) while true:     input_tester() 

i add comment won't let me because of rep. suggest trying eval(input()) in place of input(). see if helps.


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -