Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Koneki » waits before any print() output? waits before any print() output? [message #1416796] Wed, 13 February 2013 19:29 Go to next message
Eclipse UserFriend
I am trying to run my script in the editor which has code something like this:

print('Enter your Name:')'*line')

When I run it does not print out 'Enter your Name' until after I type something in the console and hit enter. This kind of defeats the point of having a prompt. This applies to all print() functions that I have in code before or after the Nothing gets printed until all of the commands have received input, then everything comes out afterward.

I have run the same code in a different editor (Zerobrane) and it works as I would expect (i.e. prints the prompt then waits for input).

Any suggestions?
Re: waits before any print() output? [message #1416797 is a reply to message #1416796] Fri, 15 February 2013 15:57 Go to previous messageGo to next message
Marc Aubry is currently offline Marc AubryFriend
Messages: 76
Registered: July 2009
Hi Kevin,

First, thanks to take time for feedback.

To work as you expect, the sdtout buffer have to be configured by adding the following line at the top of your file:

As explain in the documentation here: (buffer configuration part). You can also execute this line at each launch of your interpreter by adding the option -e "io.stdout:setvbuf('no')" to your interpreter in the configure interpreter preference page.

As other users may have the same expectation as you about the console behavior, I have also open this bug to set this interpreter argument option by default for JNLua interpreters.

Re: waits before any print() output? [message #1416798 is a reply to message #1416797] Fri, 15 February 2013 17:02 Go to previous message
Eclipse UserFriend
Thank you. Fixed the problem perfectly. I figured there was something I missed in the setup.

Previous Topic:How to remote debug
Next Topic:LDT doesn't show up (ubuntu)
Goto Forum:

Current Time: Fri Nov 16 14:49:46 GMT 2018

Powered by FUDForum. Page generated in 0.01428 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top