def del_pid(pidfile):
 if os.path.exists(pidfile):
  os.remove(pidfile)

def del_pid ( pidfile ) : if os . path . exists ( pidfile ) : os . remove ( pidfile )
the pidfile should normally be removed after a process has finished .