Python Forum
looking for code to do timed prompt on terminal
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
looking for code to do timed prompt on terminal
#1
i am looking for code or a function that can do a time limited prompt at a terminal. this would usually be a one key input to end the prompt and let the calling program know the user has a specific alternate request ... or the prompt times out and assumes any user, if present, wants the default action.

the ideal function would have a means to specify the timeout period, and message to display with a way to insert the remaining time so the message updates as the time counts down to zero. these can be separate arguments.

    key = timedprompt(20,'you have %s seconds remaining to type in a letter')
    if not key:
        log('no prompt input')
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply
#2
https://stackoverflow.com/q/1335507/4046632
https://stackoverflow.com/q/15528939/4046632
and many more. simple google search can do miracles
If you can't explain it to a six year old, you don't understand it yourself, Albert Einstein
How to Ask Questions The Smart Way: link and another link
Create MCV example
Debug small programs

Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Automatic Focus On Output To Integrated Terminal of VS-Code adt 0 3,975 Sep-11-2019, 04:28 PM
Last Post: adt
  Python Shell As Preferred Mode For Integrated Terminal In Visual Studio Code adt 4 4,100 Sep-07-2019, 06:00 PM
Last Post: adt
  Sequentially timed events using Python/Tkinter eabs86 2 2,706 Sep-12-2018, 03:11 PM
Last Post: eabs86

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020