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

stdin newlines are stripped #46

Open
qexat opened this issue Mar 10, 2024 · 0 comments
Open

stdin newlines are stripped #46

qexat opened this issue Mar 10, 2024 · 0 comments

Comments

@qexat
Copy link

qexat commented Mar 10, 2024

bug report

description

when entering text in the stdin field, if a trailing newline is added, it will not be taken in account

steps to reproduce

run the following program with the stdin set to what is below:

program

import sys

while (char := sys.stdin.read(1)) != "\n":
    print(char)

stdin

hello world

Warning

the trailing newline must be included.

expected behavior

the program should print each character of hello world on its own line

actual behavior

the program does print each character of its own line, but then the programs hangs trying to read the standard input

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