There are several different issues here. As Alan says I've done some
work on the console since 2.7b1 that may help.
1. aa = "aa" ... I've no idea why that wouldn't work, unless it is a
side effect of other problems. I've never had any problem entering
even quite complicated lines interactively. The fact that ctrl-D
breaks you out of the hang suggests Jython is stuck in a read, as if
maybe it missed the closing quote or end of line.
2. Problems with sys.stdin.readline() were discussed in Issue #1972.
Although we got two issues mixed up in the discussion there, I
worked on the never-ending readline() as part of the console and
believe it is fixed. (The console ended lines with \r and readline()
was looking for \n.)
3. I agree ctrl-C doesn't work: it irritates me too. This is logged
as issue #1957. Enabling it would be easy (I think), but comments
hint it was disabled because handling it is difficult. This may be a
ms936 looks like the sort of name Java uses, meaning page 936.
Jython uses a number of sources to guess the correct encoding,
including asking Java. (I tweaked this when I added support for
PYTHONIOENCODING.) Our support for multi-byte characters is weak:
the codecs are missing and it isn't as simple as using the Java
ones. The JLineConsole doesn't seem to do multi-byte at all. It
supports UTF-8 (on Linux) but on Windows cp65001 there just seemed
to be no input.
Some of these console problems would be alleviated by using a newer
version. I think a beta 2 is not far away. Although we've heard that
before, Jim Baker is writing optimistically about this over on
jython-dev. When that becomes available (or if you build Jython
yourself) it would be worth looking at
On 21/03/2014 22:06, Qianhong Pan
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 "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,
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