Before I open an IPython notebook, I'd like to check whether it is in a directory that is already being served by a server process. The goal is to connect to that server instead of launching yet another server for the same directory.
Background: I often work with IPython notebooks in several different directories, and since one server can only handle one directory hierarchy, I have to launch several separate notebook servers. As far as I know this cannot be avoided unless I move all my notebooks into the same directory hierarchy, right? But at least I want to avoid launching more servers than necessary. If I could check for the existence of a suitable server (and get the connection ID), I could connect to it instead of launching a new one.