Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pause() not skippable #9

Closed
tusing opened this issue Jun 12, 2015 · 4 comments
Closed

pause() not skippable #9

tusing opened this issue Jun 12, 2015 · 4 comments

Comments

@tusing
Copy link
Collaborator

tusing commented Jun 12, 2015

pause() in reddit_bot.py is not skippable. Looking for a pythonic way to implement a skippable pause function.

@StuxSoftware
Copy link
Contributor

Well you could implement it yourself by using os-dependent functions like msvcrt.kbhit and msvcrt.getch on Windows and select on the stdin-descriptor on unix based systems respectively.
To do that I would split the function off to a new module.

This stack-overflow thread might help:
http://stackoverflow.com/questions/6179537/python-wait-x-secs-for-a-key-and-continue-execution-if-not-pressed

@StuxSoftware
Copy link
Contributor

I assume the function works?

@tusing
Copy link
Collaborator Author

tusing commented Jun 13, 2015

I'm still working on it - in it's current state it actually doesn't for me. This might be because I'm using git bash through ConEmu?

@tusing
Copy link
Collaborator Author

tusing commented Jun 13, 2015

Nevermind - it works! Thank you!

@tusing tusing closed this as completed Jun 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants