I began messing around in python trying to create a frozen exe, i finally got it to work, then discovered that the input function doesn't seem to work properly when ran through the command prompt as opposed to in idle, or the interactive session. Any ideas why, or how to fix this?
Edit: When i say not properly, I mean it asks for input, but when i enter one, it does nothing. When i enter something in idle it does exactly what it's supposed to. It acts like i did nothing.
I'm using cx_freeze, didn't seem relevant because i tried just running the script in CMD without freezing it and it did the same thing.
while idea != 'new':
idea = input('...')
if idea == 'hit':
del hand2[0:]
del hand4[0:]
hand2.append(random.choice(num))
for i in hand2:
if i == 10:
a = random.choice(num2)
hand.append(10)
hand3.append(a)
elif i == 1:
if sum(hand) + 11 < 21:
hand.append(11)
hand3.append('Ace')
else:
hand.append(1)
hand3.append('Ace')
else:
hand3.append(i)
hand.append(i)
It will not acknowledge that i typed in hit, even though it does in idle and the interactive session.
repr(idea)directly after theinput()call. It's possible the newline character is included incmd, while it's not included in IDLE.print()functions afterinput(), what did you see?