I have some code like this in my tk program..
2. How do I insert the other code in this loop that gets called repeatedly?
root = tk.Tk() # (code like entry boxes, labels, functions, etc.) root.mainloop() # the last statementSpecifically I want to continually display my webcam and also to be able to use the buttons, labels, and etc.
while(True): # Capture frame-by-frame ret, frame = cap.read() # Our operations on the frame come here gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY) # Display the resulting frame cv2.imshow('frame',gray) if cv2.waitKey(1) ==27: break1. What is the function of root.mainloop() ? Is this a never ending loop?
2. How do I insert the other code in this loop that gets called repeatedly?
buran write Jan-23-2022, 05:41 PM:
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.
Please, use proper tags when post code, traceback, output, etc. This time I have added tags for you.
See BBcode help for more info.