[IPython-dev] connecting ipythonqt to an existing kernel should not require specifying 4 ports
Thu Sep 9 20:11:29 CDT 2010
On Thu, Sep 9, 2010 at 5:32 PM, MinRK <email@example.com> wrote:
> On Thu, Sep 9, 2010 at 17:21, Evan Patterson <firstname.lastname@example.org> wrote:
>> On Thu, Sep 9, 2010 at 3:58 PM, MinRK <email@example.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.
More information about the IPython-dev