diff -r 5064a5c5b1a3 src/org/python/core/Py.java --- a/src/org/python/core/Py.java Mon Apr 13 23:17:20 2015 -0400 +++ b/src/org/python/core/Py.java Tue Apr 14 09:33:36 2015 -0500 @@ -1533,10 +1533,14 @@ * @return true if (we think) we are in an interactive environment */ public static boolean isInteractive() { + // python.launcher.tty is authoratative; see http://bugs.jython.org/issue2325 String isTTY = System.getProperty("python.launcher.tty"); if (isTTY != null && isTTY.equals("true")) { return true; } + if (isTTY != null && isTTY.equals("false")) { + return false; + } // Decide if System.in is interactive try { POSIX posix = POSIXFactory.getPOSIX(); diff -r 5064a5c5b1a3 src/org/python/util/jython.java --- a/src/org/python/util/jython.java Mon Apr 13 23:17:20 2015 -0400 +++ b/src/org/python/util/jython.java Tue Apr 14 09:33:36 2015 -0500 @@ -408,11 +408,16 @@ if (opts.fixInteractive || (opts.filename == null && opts.command == null)) { // Go interactive with the console: the parser needs to know the encoding. String encoding = Py.getConsole().getEncoding(); - // Run the interpreter interactively try { interp.cflags.encoding = encoding; - interp.interact(null, null); + if (!opts.interactive) { + // Don't print prompts. http://bugs.jython.org/issue2325 + interp._interact(null, null); + } + else { + interp.interact(null, null); + } } catch (Throwable t) { Py.printException(t); }