#how do i program an emergency stop button
12 messages · Page 1 of 1 (latest)
@orchid hatch
Remember to:
- Ask your Python question, not if you can ask or if there's an expert who can help.
- Show a code sample as text (rather than a screenshot) and the error message, if you've got one.
- Explain what you expect to happen and what actually happens.
:warning: Do not pip install anything that isn't related to your question, especially if asked to over DMs.
Closes after a period of inactivity, or when you send !close.
stop button for what?
!e
print("this is an emergency stop button!")
Ctrl + C
Otherwise, check this article:
https://pythondiscord.com/pages/resources/guides/asking-good-questions/
A guide for how to ask good questions in our community.
for stuff in General its more of a concept tho
well, if you want some hotkey registration, you can probably use the keyboard or pynput module ... not sure how good they are though, as I never used them.
Op is also in discussion regarding this in pygen. Hooray crossposting

a program stop generally with three cases
- os level job kill
- a signal is detected by the program, this requires the program to have some checking mechanic
- errors, this needs to be captured by the program too