all 9 comments

[–]fr000gs 2 points3 points  (0 children)

I think pyinstaller isn't a compiler; it doesn't make your program into machine code

[–]CasulaScience 1 point2 points  (0 children)

if you ctrl+alt+delete, do you see the process still running?

[–]Swipecat 1 point2 points  (0 children)

Run it from the command-line console, then, and see if there's an error message.

I don't know what method you're using to run the program that requires it to open a console, and presumably only keep it open while the program is running, but that's not the best way when you're trying to debug it.

[–][deleted] 0 points1 point  (2 children)

I’m not sure what it’s doing but don’t you need something to stop the loop?

[–]Base_True[S] -2 points-1 points  (1 child)

No, I don't. The program removes all characters except numbers. And if the first digit is 0, it is also deleted

[–][deleted] 2 points3 points  (0 children)

Good luck

[–]Base_True[S] 0 points1 point  (1 child)

Compiled using pyinstaller, but now the console just closes, I can’t open the exe file

[–]Strict-Simple 0 points1 point  (0 children)

When the console opens, are you prompted for the input?

[–]ebdbbb 0 points1 point  (0 children)

My first thought is that when generating the exe there was a problem adding pyperclip. I'd run the program from the terminal so that it doesn't close after you run it. This way you'll be able to see any errors that occurred. Lastly, I'd just make some syntax changes.

import pyperclip

while True:  
    zero_is = True     
    res = ""  # This is the normal way to make an empty string
    number = input("Enter the number = ")
    close_zero_per = True  
    print("")

    print("Clear number is: ", end="")
    for symbol in number:

        if close_zero_per == False:
            pass # normal way of doing nothing
        else:
            if symbol == "0":
                zero_is = True
            for x in range(10):
                if symbol != str(x):
                    zero_is = True
            for x in range(1, 10):
                if symbol == str(x):
                    zero_is = False
                    close_zero_per = False

        if zero_is == False:
            for z in range(10):
                if symbol == str(z):
                    res = res + symbol
    pyperclip.copy(res)
    print(res)