Hi, Alan,

Thanks a lot for the quick reply and the links. So glad the Windows issues are being addressed.

The workaround works for most of the issues except the "aa='aa'" command on Windows which is a very basic command. So we can't really rely on this workaround.

Is there a Jython issue logged for this?

Having another beta would help to verify and test issues on Windows.

BTW, the jdk version is 1.7.0_51 if it matters.

>java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)

Thanks again,

On Fri, Mar 21, 2014 at 1:55 PM, Alan Kennedy <jython-dev@xhaus.com> wrote:
Jython beta 1 is over a year old now, and had significant problems with terminal IO on Windows.


Jeff Allen has done a very significant amount of work to deal with these windows terminal issues (see recent checkin history for more information).


> Is there any workaround?

I think you've already identified the simple workaround of using "-Dpython.concole=org.python.util.InteractiveConsole".

> or is there a plan to fix it soon?

Given Jeff's work, it's probably time for another beta, to get those fixes into the version that people are downloading and trying.

Jeff, thoughts?


On Fri, Mar 21, 2014 at 6:03 PM, Qianhong Pan <rose.qpan@gmail.com> wrote:
Hi, Jython-users,

I am trying the Jython 2.7 beta 1 standalone downloaded from:


but found some issues running it on Windows 8 platform. The same commands works fine on Linux. Not sure if it's an known issue or not.

Below are the test results on Linux and Windows w/o the workaround of adding "-Dpython.concole=org.python.util.InteractiveConsole".

The stack trace is also attached.

The non working basic command like aa="aa" makes Jython 2.7 beta 1 not usable on Windows.

Is there any workaround or is there a plan to fix it soon?

Thanks a lot for your help.



jython 2.7 beta 1 standalone:


1. aa="aa" works.
2. sys.stdin.readline() works.
3. CTRL +C works.


1. aa="aa" hangs. CTRL + D  + enter to exit
2. sys.stdin.readline() hangs. CTRL + D or CTRL + C not working. need to kill the java process
3. CTRL + C shows a heart. Hit "enter" to exit with this message:
LookupError: unknown encoding 'ms936'

jython 2.7 beta 1 standalone + -Dpython.console=org.python.util.InteractiveConsole:


1. aa="aa" works
2. sys.stdin.readline() works.
3. CTRL + C works.


1. aa="aa" hangs. CTRL + D  + enter to exit
2. sys.stdin.readline() works.
3. CTRL + C works.


The stack trace when aa="aa" hangs looks like this:

"main" prio=6 tid=0x011ab800 nid=0x4d8 runnable [0x011ff000]
   java.lang.Thread.State: RUNNABLE
        at java.io.FileInputStream.readBytes(Native Method)
        at java.io.FileInputStream.read(FileInputStream.java:272)
        at java.io.BufferedInputStream.read1(BufferedInputStream.java:273)
        at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
        - locked <0x2a3f0d00> (a java.io.BufferedInputStream)
        at java.nio.channels.Channels$ReadableByteChannelImpl.read(Channels.java:385)
        - locked <0x2a550550> (a java.lang.Object)
        at org.python.core.io.StreamIO.readinto(StreamIO.java:123)
        at org.python.core.io.BufferedReader.peek(BufferedReader.java:86)
        at org.python.core.io.BufferedReader.read1(BufferedReader.java:100)
        at org.python.core.io.TextIOBase.readChunk(TextIOBase.java:263)
        at org.python.core.io.TextIOWrapper.readline(TextIOWrapper.java:243)
        at org.python.core.PyFile.file_readline(PyFile.java:266)
        - locked <0x2a524558> (a org.python.core.PyFile)
        at org.python.core.PyFile.readline(PyFile.java:274)
        at org.python.core.__builtin__.readline(__builtin__.java:1003)
        at org.python.core.__builtin__.raw_input(__builtin__.java:1019)
        at org.python.core.__builtin__.raw_input(__builtin__.java:1035)
        at org.python.util.InteractiveConsole.raw_input(InteractiveConsole.java:126)
        at org.python.util.InteractiveConsole.interact(InteractiveConsole.java:81)
        at org.python.util.jython.run(jython.java:378)
        at org.python.util.jython.main(jython.java:137)

Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
Jython-users mailing list