0
Python print() not working on my PC
I created the python "a.py". Write inside the below. x = input ("Entre interger") print (x) When I export .py to .exe, print() function not working. Show "Entre interger", I key in integer, then the program end. don't show the value of x. Please help. When I run in IDLE, the program works.
4 Réponses
+ 2
What do you do to convert the .py to an .exe? How do you run the .exe? Does it run in a new console window? Is it possible that the console window just immediately closes after showing the output so that it looks like it doesn't show anything?
+ 2
Kyaw Myo when you created a program into .exe
after the program finished, the console usually quits automatically.
so, what i usually do is put an extra input() at the end to avoid ending the program until you pressed enter.
here is the correct code
x = input("enter integer")
print(x)
input()
0
Converted exe file by using pyinstaller in command prompt.
0
Thanks bro, let me try.