Search code examples
pythonpyinstaller

I converted py file to an exe file (pyinstaller) i used a print statement before input but while running the exe file it doesnt print and takes input


snippet of exe file after opening and entering a number

After opening .exe file it shows a blinking cursor but it has to print 'enter a number' according to the code, but after I enter any number it prints the statement along with the number I entered... Is there any way to print that statement before entering value?


Solution

  • Have you tried using input()?

    def check():
        d = int(input("Guess the number: "))
    

    I assume you're using Python 3, if you're using Python 2 you need to use raw_input().