ipython/ipython — pull request #2148 by bfroehle (2012-07-17 00:38:00+00:00)
Title: win32 iptest: Use subprocess.Popen() instead of os.system().

(Do not merge, needs testing in Windows).

The call to `os.system` in `iptest` prevents us from easily setting `$IPYTHONDIR` to a temporary directory. In theory we should be able to use `subprocess.Popen` instead of `os.system` in Windows. This would unify the code structure and make it easy to pass in a different environment.

Note that Python < 2.7 does not have `os.kill`. I've attempted to work around this by using `ctypes` to kill any living processes.

I haven't actually tested any of this in Windows. Perhaps @jdmarch or @jstenar or somebody else using windows could run some tests with it.