How can I send a signal from a python program?

You can use os.kill():

os.kill(os.getpid(), signal.SIGUSR1)

Put this anywhere in your code that you want to send the signal from.

Leave a Comment