[IPython-dev] connecting ipythonqt to an existing kernel should not require specifying 4 ports

MinRK benjaminrk@gmail....
Thu Sep 9 20:25:28 CDT 2010

On Thu, Sep 9, 2010 at 18:11, Evan Patterson <epatters@enthought.com> wrote:

> On Thu, Sep 9, 2010 at 5:32 PM, MinRK <benjaminrk@gmail.com> wrote:
> >
> >
> > On Thu, Sep 9, 2010 at 17:21, Evan Patterson <epatters@enthought.com>
> wrote:
> >>
> >> On Thu, Sep 9, 2010 at 3:58 PM, MinRK <benjaminrk@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.
> >
> > Good point, that makes a two-stage connect even more important, since you
> > can't expect the relationship between the port numbers to be well
> behaved.
> >
> >>
> >> 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.
> >
> > The problem is not that I care what the ports are, quite the opposite. I
> > don't want to care what the ports are, but the current state requires me
> to
> > track a new set of 4 every time. This is quite unpleasant for launching
> > multiple clients on a kernel, in addition to being unnecessary.
> > It should be very easy to connect additional clients to a running kernel,
> > and specifying every port by hand does not qualify.
> > $> ipythonqt -e
> > should successfully connect to a kernel started with:
> > $> ipythonqt
> > At the _very worst_, a single port (or file) should have to be specified
> to
> > connect to a kernel launched with defaults.
> > This can be done, as it was in Twisted code, via a file in IPYTHON_DIR,
> or
> > even better with a two-stage connect.
> I see your point; something does have to be done about this. That
> being said, it's important to keep in mind that ipythonqt is currently
> not so much an application as a tech demo, so there are definitely
> some usability issues to be worked out. The Qt widget itself is
> becoming fairly polished, but the application needs some work.

Certainly, this sort of thing falls in priority well behind polishing the
already super cool qtwidget functionality (well done on that, by the way). I
just noticed that it requires more information than it should when I tried
testing using raw_input with multiple clients, and I had to tyep it out
several times, since the current raw_input is sufficiently broken that I had
to start many fresh frontends, rather than just killing the kernel.


> Evan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20100909/e85fad1c/attachment.html 

More information about the IPython-dev mailing list