Reputation: 1
I'm new to the mac environment and have never had issues loading tkinter apps on a windows computer. Working on a new basic script to just automate filling out a google form for the sake of my sanity so I don't have to keep filling it out.
When I try running my code through the built in terminal in VS code, or in an external terminal, I run into this issue where I have no errors but my tkinter window refuses to load. I only get the jumping application button in my tool bar for an application named "Python". pic of python icon in tool bar
(don't mind the poor code this is lowkey held together by my hopes and wishes)
from pynput.keyboard import Listener, KeyCode, Controller, Key
import time
from tkinter import *
root = Tk()
root.title('Hour Sheet Automator')
root.geometry('100x100')
def on_press(key):
keyboard = Controller()
start = KeyCode(char='s')
#omitted rest of this function because it includes sensitive info
#what was here just included pynput commands
def clicked():
on_press()
with Listener(on_press = on_press) as listener:
listener.join()
start_btn = Button(root, text = 'start', fg = 'pink', command=clicked)
start_btn.place(relx=0.5, rely=0.5, anchor=CENTER)
root.mainloop()
Upvotes: 0
Views: 76