[IPython-dev] connecting ipythonqt to an existing kernel should not require specifying 4 ports
Evan Patterson
epatters at enthought.com
Thu Sep 9 20:21:37 EDT 2010
On Thu, Sep 9, 2010 at 3:58 PM, MinRK <benjaminrk at gmail.com> wrote:
> Hello,
> In order to connect a second ipythonqt frontend to an existing kernel, I
> must specify by hand all 4 ports at the command-line. This really shouldn't
> be the case, especially since the default behavior is to have the ports
> ordered sequentially.
That may be the default behavior of your OS, but that's not the
default behavior in general. Random port is selection is currently
left entirely up to the OS (as it should be), and on some systems this
means that you get ports that appear to be totally random.
Guaranteeing that the ports are in consecutive order requires ugly
code (a while loop that keeps binding a port until you find one that
has three consecutive ports that are also open). Frankly, I think that
if you care what the ports are, you should just pass them when
launching the kernel in the first place.
Evan
More information about the IPython-dev
mailing list