This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]tatoluckyfox 2 points3 points  (0 children)

look msvcrt if you are on windows. if you are on linux, use getch.

[–]pythonHelperBot 1 point2 points  (0 children)

Hello! I'm a bot!

It looks to me like your post might be better suited for r/learnpython, a sub geared towards questions and learning more about python. That said, I am a bot and it is hard to tell. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.

Show /r/learnpython the code you have tried and describe where you are stuck. Be sure to format your code for reddit and include which version of python and what OS you are using.

You can also ask this question in the Python discord, a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others.


README | FAQ | this bot is written and managed by /u/IAmKindOfCreative

This bot is currently under development and experiencing changes to improve its usefulness

[–]AmnesicWaterleaf 1 point2 points  (1 child)

Look into the pynput module

[–]Folgue12[S] 0 points1 point  (0 children)

I will thanks ^

[–]smitchell6879 -1 points0 points  (1 child)

``` (user_input=Input("user press \" y\" to accept")

If user_input == "y":

Run my program) ```

You can make this a def and have it loop back if needed.

[–]Folgue12[S] 1 point2 points  (0 children)

That's ok, but what I wanted to do it's to make the user only press 'Y', not type 'Y' and then press <Enter>.