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

Incorrect LineReturn when executing shell Python Embedded #144

Open
jtsalten opened this issue Jan 25, 2022 · 3 comments
Open

Incorrect LineReturn when executing shell Python Embedded #144

jtsalten opened this issue Jan 25, 2022 · 3 comments
Labels

Comments

@jtsalten
Copy link

When executing python commands in Python shell, the command line prompts gets bad positioned. For single command it's acceptable, but it's annoying if you run a command or piece of code that print several lines...
image

@nikitaeverywhere
Copy link
Member

Hello! Thanks for reporting this.

FYI I'm not currently maintaining this project though I am an author of it.

I guess the problem is with newline characters that come to the front end; WebTerminal makes a newline on \n character (which seem to come from the ObjectScript application), while \r is needed as well to return the cursor to the beginning of the line, i.e. \r\n.

Not sure what exactly is the case in this bug.

@eduard93
Copy link
Contributor

eduard93 commented Feb 12, 2022

@jtsalten not a solution, but a workaround. Execute this on Python shell startup and most of the times \r\n would be present:

import functools
print = functools.partial(print, end='\r\n')

Sample output:
image

@jtsalten
Copy link
Author

That trick didn't work for me...
Now is failing differently...
image

image

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

No branches or pull requests

3 participants