When I try to convert this code to exe file it runs a cmd window

30 Views Asked by At

When I try to convert this code to exe file it runs a cmd window with the title C:\Windows\system32\cmd.exe:

path = 'supported_languages.txt'
os.system(f'notepad.exe {path}')

Here is the code I use for convert it to exe file:

pyinstaller --noconfirm --onedir --windowed --icon "[ICON PATH]"  "[FILE PATH]"
1

There are 1 best solutions below

0
Eitan On

Change the extension file name from .py to .pyw