I have this code which listens to USR1 signals
import signal import os import time def receive_signal(signum, stack): print \'Received:\', signum signa
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.