Soham Chatterjee
Soham Chatterjee

Reputation: 61

How to know the last launch time of a Python Program?

I am creating a Voice Assistant Program using Python and I wanna add a feature to it that shows the last time when the Assistant was used. Is there any method to do that? I am using tkinter for my GUI.

Upvotes: 1

Views: 63

Answers (2)

Florin C.
Florin C.

Reputation: 613

In high level terms, the solution sounds like this:

Upvotes: 1

Joris Schellekens
Joris Schellekens

Reputation: 9057

Often times, the obvious answer is the easiest/right one.

In this case, why not store the previous usages of the voice assistant?

It offers you a lot of benefits:

  • Being able to tell the user what was recognized previously
  • Allowing the user to spot previous (perhaps untowards) usage
  • Machine learning opportunities (previous utterances can be used as a reference for popular commands)
  • Repeat a command from the 'last x commands' list

Upvotes: 2

Related Questions