sys is problematic in Python, or at least the Jython implementation, given its unique role - we always seems to be special casing for it. This is just one more example - we want better console support and we need specific Closer support.

At least it should be an easy fix.


On Tue, Mar 4, 2014 at 2:12 AM, Jeff Allen <report@bugs.jython.org> wrote:

Jeff Allen added the comment:

I confirm this behaviour. Choosing not to have the fancy console is the work-around:

>dist\bin\jython -Dpython.console= -c "import sys; sys.stdout.write('hello')"
hello
>

I'm pretty sure I broke this. The wrapper I made for the fancy console keeps each unterminated output line, defeating the upstream flush() until you start a read. This is the only way I found to get the line editing JLineConsole to know about the prompt.

As Jim comments, what's needed here is to give my clever wrapper a Closer that will flush the "prompt" you never used.

----------
assignee:  -> jeff.allen
keywords: +console
nosy: +jeff.allen

_______________________________________
Jython tracker <report@bugs.jython.org>
<http://bugs.jython.org/issue2089>
_______________________________________