#how do i program an emergency stop button

12 messages · Page 1 of 1 (latest)

fickle questBOT
#

@orchid hatch

Python help channel opened

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.

neat snow
#

stop button for what?

torn field
#

!e

print("this is an emergency stop button!")
still gull
#

Ctrl + C

still gull
orchid hatch
neat snow
#

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.

torn field
neat snow
coarse roost
#

a program stop generally with three cases

  1. os level job kill
  2. a signal is detected by the program, this requires the program to have some checking mechanic
  3. errors, this needs to be captured by the program too