OiO.lk Community platform!

Oio.lk is an excellent forum for developers, providing a wide range of resources, discussions, and support for those in the developer community. Join oio.lk today to connect with like-minded professionals, share insights, and stay updated on the latest trends and technologies in the development field.
  You need to log in or register to access the solved answers to this problem.
  • You have reached the maximum number of guest views allowed
  • Please register below to remove this limitation

Close cmd window in ttk

  • Thread starter Thread starter Mendo
  • Start date Start date
M

Mendo

Guest
I compiled my python file into an executable. The python file contains the tkinter code that opens up a window with buttons. When i run my executable, the window opens, but the cmd also opens. So i have the ttk window and cmd, and if i close cmd, the ttk window also disappears.

I used cx_Freeze module to compile my python file if that helps in any way. Generally i dont think its possible due to the cmd window being the program itself, and the ttk window being a sub-window of cmd

I tried os.system("taskkill /f /im cmd.exe") but that didnt work, regardless of if i put it after or before the mainloop()

I expected it to close the cmd window
<p>I compiled my python file into an executable. The python file contains the tkinter code that opens up a window with buttons. When i run my executable, the window opens, but the cmd also opens. So i have the ttk window and cmd, and if i close cmd, the ttk window also disappears.</p>
<p>I used cx_Freeze module to compile my python file if that helps in any way. Generally i dont think its possible due to the cmd window being the program itself, and the ttk window being a sub-window of cmd</p>
<p>I tried os.system("taskkill /f /im cmd.exe") but that didnt work, regardless of if i put it after or before the mainloop()</p>
<p>I expected it to close the cmd window</p>
 

Latest posts

Online statistics

Members online
0
Guests online
2
Total visitors
2
Top