🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

tktimer

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tktimer

Timer (stopwatch and countdown) widgets for tkinter

0.1.0
PyPI
Maintainers
1

tktimer

tktimer is a set of tkinter widgets including a Stopwatch widget and a Countdown widget.

Installing

$ pip install tktimer

Usage

The timers have two methods: start() and pause().

You can find example programs in examples/.

Available options:

optiondescriptiondefault
parentset the parent widget.
prefixset text before timer value.""
suffixset text after timer value.""
unitset the unit (available: second, minute, hour, day, week, year).second
beginningset starting point (in seconds). specific to Countdown.10
update_everyset updating time every X milliseconds.10
precisionset counting precision (number of digits after the decimal point).2
offsetset time offset (in seconds). specific to Stopwatch.10

FAQ

How can I continue the timer after restarting my app?

You can get the elapsed time (in seconds) with timer.value.get() on exit and set offset later on, which will make the timer start counting from offset. For Countdown, tweak beginning instead of offset.

I'm not happy with how my timer looks like. Can I change its appearance?

Yes, timers are ultimately just tkinter labels which means you can do anything you would to an ordinary tkinter.Label.

Licensing

Licensed under the MIT License. For details, see LICENSE.

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

OSZAR »