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 gets mixedup after specific output #26

Closed
tiagocoutinho opened this issue Jun 23, 2018 · 4 comments
Closed

Console gets mixedup after specific output #26

tiagocoutinho opened this issue Jun 23, 2018 · 4 comments

Comments

@tiagocoutinho
Copy link

tiagocoutinho commented Jun 23, 2018

Executing any python code that results in printing to the screen a line that ends with '. \n' or '> \n' messes up the console.
Example: printing any string on the screen that ends with '. \n' or '> \n' messes up the console:

$ apython
>>> print('> ')
> # cursor stays here as if waiting from a user prompt. 

# From now on the console is in a weird state

Expected:

$ apython
>>> print('> ')
> 
>>> # I get the prompt back
@tiagocoutinho
Copy link
Author

tiagocoutinho commented Jun 23, 2018

Another example (maybe is a different issue) is printing with print(..., end='', flush=True)

Example:

$ apython
>>> for i in range(10):
...   print('#', end='', flush=True)
...   # console gets blocked here

@tiagocoutinho tiagocoutinho changed the title Console gets mixedup after specific code output Console gets mixedup after specific output Jun 23, 2018
@vxgmichel
Copy link
Owner

Thanks for the report @tiagocoutinho

Those two issues are related to the hackish prompt detection for the readline support, but it should get better once PR #25 is merged.

For the moment, the simplest way to work around those issues is to disable readline: apython --no-readline.

@tiagocoutinho
Copy link
Author

tiagocoutinho commented Jun 27, 2018

Great! It is not urgent for me at all. Also the --no-readline work around suits my needs.
BTW, thanks for the great project. Really helps me getting into async/await.

@vxgmichel
Copy link
Owner

Fixed! It will become visible in version 0.1.9.

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

2 participants