I have a python script that is using the SIGSTOP and .SIGCONT commands with os.kill to pause or resume a process.  Is there a way to determine whether the related PID is in the paused or resumed state?
call ps and check the STAT value.
D    Uninterruptible sleep (usually IO)
R    Running or runnable (on run queue)
S    Interruptible sleep (waiting for an event to complete)
T    Stopped, either by a job control signal or because it is being traced.
W    paging (not valid since the 2.6.xx kernel)
X    dead (should never be seen)
Z    Defunct ("zombie") process, terminated but not reaped by its parent.
Is there a way to determine if a Linux PID is paused or not?