Interestingly, last Friday, I was commenting on pexpect support with respect to supporting ipython. (As I understand it, pexpect is used for testing ipython.)

Here's what I wrote in

Re pexpect, I looked at; there are four problematic imports:
  • pty
  • tty
  • termios
  • fcntl
It looks like and its dependency allow Jython to support pty and termios; it's not clear to me how JPty manages file descriptors, although in principle they are accessible through JFFI/JNI.

In principle, this doesn't look so bad for an interested person to explore. It's a very nice self-contained project that would consist of identifying appropriate third-party jars, such as for JPty; glueing together with Python code using this Java functionality; and publishing into PyPI. At some point, including depending on the jars licensing, we could explore incorporating into Jython directly, say in a 2.7.1 or later release.

There was more discussion here on the jython-dev mailing list about termios:

Since fork tends to come up in these discussions (including the above email), I should point out this email thread started on this subject by one of the JRuby core devs:

In a nutshell, true support of fork is not feasible until the JVM supports it. And that support would be very hard.

- Jim

On Sun, May 4, 2014 at 8:01 AM, chris snow <> wrote:
I've seen posts from around 2007 stating that pexpect doesn't work with jython.

Has the situation changed since then?

"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
Jython-users mailing list