I know this is old, but I've used this and it seems to work; you can do a quick adaptation to convert from process name to process id:
try:
if len( os.popen( "ps -aef | grep -i 'myprocess' | grep -v 'grep' | awk '{ print $3 }'" ).read().strip().split( '\n' ) ) > 1:
raise SystemExit(0)
except Exception, e:
raise e