Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Console doesn't update until app exits #5

Open
joerick opened this issue Dec 18, 2015 · 0 comments
Open

Console doesn't update until app exits #5

joerick opened this issue Dec 18, 2015 · 0 comments

Comments

@joerick
Copy link
Member

joerick commented Dec 18, 2015

This app:

import tingbot
from tingbot import *

def loop():
    screen.fill(color='black')
    screen.text('Hello world!')
    print 'testing...'

tingbot.run(loop)

Will run for about 1 minute before logs appear in Tide.

Looks like there's a buffer somewhere that's not flushing. The following works:

import tingbot
from tingbot import *
import sys

def loop():
    screen.fill(color='black')
    screen.text('Hello world!')
    print 'testing...'
    sys.stdout.flush()

tingbot.run(loop)

Maybe could be fixed using PYTHONUNBUFFERED, otherwise we might have to emulate a TTY.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant