ipython/ipython — pull request #1657 by tkf (2012-04-25 11:40:09+00:00)
Title: Add `wait` optional argument to `hooks.editor`

subprocess.Popen is used instead of os.system in order to spawn editor process in non-blocking manner.

See also: #1655

I think there are two ways to improve this patch (as @takluyver suggested):

1. When `wait == False`, sleep short time (0.1 sec) right after starting editor process to check if the editor exits with non-zero exit code.

2. Catch stdout/err when `wait == False` so that message will not be printed in unexpected way (like after the next `In[]` prompt). If we add sleep, error message can be printed only when editor exits immediately with an error.

Please tell me if you want to implement these.