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

Python editor should show stdin on output #693

Open
NALStudio opened this issue Aug 30, 2023 · 0 comments · May be fixed by #694
Open

Python editor should show stdin on output #693

NALStudio opened this issue Aug 30, 2023 · 0 comments · May be fixed by #694

Comments

@NALStudio
Copy link

NALStudio commented Aug 30, 2023

I have two small gripes with the Python editor in digabi. As they are relatively different, I've decided to split them into two separate issues. The other can be found here: #692. I might take a crack at implementing these myself over the coming days and I'll make a single pull request for them both if I manage to succeed.

The issue

When using stdin, the input is omitted from the program's output.
image
As the output of a program is often screenshotted as the answer to exam questions, it would make it clearer to any 3rd parties what the program is actually doing if the stdin would be visible on output.
This change also better mimics the behaviour of most terminals. For example, PowerShell behaves like this:
image

Solution

After the user has provided the input()/stdin with a value, the prompt + user given input are written onto output similar to PowerShell for example. In a perfect world I could use Solution 2 from #692 and merge everything into a single output buffer similar to most terminals, but its implementation still has some question marks around it. If it is decided that the best way is to proceed with Solution 2, it could be discussed whether stdin should be coloured cyan as stderr is planned to be coloured red in Solution 2, but I haven't made any concrete plans with a cyan stdin yet. If it is decided that the plan forward with the aforementioned issue is Solution 1, then I see no point in colouring the stdin as it makes the scope of this feature's implementation too big and also makes the program's output quite messy.

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