Bug 427128 - should not buffer python script run or debug output
Summary: should not buffer python script run or debug output
Status: RESOLVED DUPLICATE of bug 384791
Alias: None
Product: kdev-python
Classification: Developer tools
Component: User interface (show other bugs)
Version: 5.5.2
Platform: Appimage Linux
: NOR normal
Target Milestone: ---
Assignee: Sven Brauch
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-09-29 20:07 UTC by Gaël de Chalendar (aka Kleag)
Modified: 2020-09-29 21:29 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gaël de Chalendar (aka Kleag) 2020-09-29 20:07:02 UTC
SUMMARY


STEPS TO REPRODUCE
1. Setup a launch configuration to run the following script:
import time

for i in range(100000000):
    print(i)
    time.sleep(0.001)

2. Run/debug the launch configuration

OBSERVED RESULT
Outputs appear in batches each one or 2 seconds.

EXPECTED RESULT
As in a console, ran or debugged program output (even if stdout) should not be buffered

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 
KDE Frameworks 5.69.0
Qt 5.12.8 (construit sur 5.12.8)
KDE Neon

ADDITIONAL INFORMATION
Comment 1 Francis Herne 2020-09-29 20:25:33 UTC
Yep, this is a bit annoying.

You can use `sys.stdout.flush()`, but it shouldn't be necessary.

*** This bug has been marked as a duplicate of bug 384791 ***
Comment 2 Sven Brauch 2020-09-29 20:28:36 UTC
I don't understand why this happens, I tried investigating before but never dug deep enough to find the reason. The complaint is valid, of course.
Comment 3 Gaël de Chalendar (aka Kleag) 2020-09-29 21:29:10 UTC
Side note: how did I miss the original bug which I duplicated? I searched before submitting!

I currently work on a research project using AI for helping software engineering, doing requirements traceability for example. Maybe I should add bug duplicate detection as an important task to handle!