I'm looking for a way to create a full screen window and not showing console (or the borders), and escape the full screen when 'escape' is pressed. I have tried to rename the extension from 'py' to 'pyw', but it didn't hide the side bar as some suggested.
Here is my code to maximize the window, but it doesn't hide the console:
def __init__(master): #I'm using tkinter for my GUI
master = master
width, height = master.winfo_screenwidth(), master.winfo_screenheight()
master.geometry("%dx%d+0+0" % (width, height))
In addition, I need to use the script on both Mac and Windows, are they working differently if I need to hide the console?
I have tried overrideredirect(True)
, but it doesn't allow me to use keyboard, which is required for my task. I also tried wm_attributes('-fullscreen', True)
, but it doesn't create exactly full screen, there's empty place at the top where the Mac Taskbar existed.
So is there any way that allows me use full screen without the toolbar (MacOS), and the keyboard works?
Thanks!