Opened 4 years ago

Last modified 3 years ago

#22579 new enhancement

Pexpect-like interfaces based on jupyter_client

Reported by: mkoeppe Owned by:
Priority: major Milestone: sage-wishlist
Component: interfaces Keywords: days84
Cc: jdemeyer, SimonKing, gh-sebasguts Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges


Many computational systems are nowadays available as jupyter kernels. We should interface to them using jupyter_client. This would be more robust than pexpect.

Change History (7)

comment:1 Changed 4 years ago by jdemeyer

Do you have a concrete kernel in mind? I'm wondering if there are any kernels where this approach makes more sense than other approaches (like pexpect or directly interfacing the libary).

comment:2 follow-up: Changed 4 years ago by mkoeppe

This topic came up here at days84 related to polymake (#22452), however I see very wide applicability.

Obviously, directly interfacing a library is almost always better -- except if one wants to be able to access a remote server.

But a pexpect interface seems to be much easier to write -- except for tricky/brittle things such as tab completion and signal handling.

With a jupyter kernel all these tricky things are already implemented. So there would be a separation of concerns, which we can benefit from.

Moreover, since there is a clear over-the-wire protocol, rather than having to send everything through a pty, this will be more robust.

comment:3 in reply to: ↑ 2 Changed 4 years ago by jdemeyer

I think it all depends on how the Jupyter kernel is implemented. Obviously, if the Jupyter kernel uses pexpect, you cannot gain much from this approach.

comment:4 Changed 4 years ago by SimonKing

  • Cc SimonKing added

comment:5 Changed 3 years ago by mkoeppe

  • Cc gh-sebasguts added

comment:6 Changed 3 years ago by jdemeyer

If nobody can come up with a concrete proposal here, I'd rather close this as "wontfix". It's a cute idea but I don't really see the point.

comment:7 Changed 3 years ago by mkoeppe

  • Milestone changed from sage-7.6 to sage-wishlist

I have set it to 'wishlist'. I hope that's good enough. I would like to keep the ticket open because I may want to work on it at some time.

Note: See TracTickets for help on using tickets.