'How to get/read time from tktimepicker in python tkinter?

This is my code:

import tkinter as tk
from tktimepicker import AnalogPicker, AnalogThemes,constants
root = tk.Tk()
time_picker = AnalogPicker(root,type=constants.HOURS24)
time_picker.pack(expand=True, fill="both")
theme = AnalogThemes(time_picker)
theme.setDracula()
root.mainloop()


Solution 1:[1]

Here is the documentation you need.

HOURS:

Methods: getHours -This takes no arguments and returns the current hour it is pointing to.

Events: <<HoursChanged>> - This event is generated when hours is changed.

MINUTES:

Methods: getMinutes- Takes no arguments and returns the current minutes.

Events: <<MinChanged>> - Generated when the minutes is changed.

Examples

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Art