def poll(self):
        """Returns -1 if child process has not completed yet, or its status code (see wait()) otherwise."""
        if self._p.worker.is_alive():
            return -1
        else:
            return self._p.worker.state.return_value
Returns -1 if child process has not completed yet, or its status code (see wait()) otherwise.
lib/mlpatches/modules/popen2.py