No newline when input
See original GitHub issueCode example:
while True:
x = input("type:")
try:
do(x)
except:
log.error("error")
STDout:
type: string
type: {log.error}
string
type: {log.error}
string
type: {log.error}
string
Issue Analytics
- State:
- Created 3 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
python - Possible to get user input without inserting a new line?
In short: You can't. raw_input() will always echo the text entered by the user, including the trailing newline. That means whatever the user...
Read more >Python New Line: How to Print WITHOUT Newline in Python
To get the strings to print without a newline, in python2.x you will have to add a comma (,) at the end of...
Read more >Suppressing the newline character - IBM
When you press <Enter>, a <newline> character is automatically appended to the characters you typed. For certain UNIX applications, you may want to...
Read more >Python: How to Print Without Newline? - STechies
In Python 3, print() is a function that prints output on different lines, every time you use the function. However, you can avoid...
Read more >Removing trailing newline character from fgets() Input
So, in this article, we are going to see some methods to remove trailing newline characters from fgets() input. Methods to remove trailing ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
So, output seems malformed regardless of the
colorize
value. 😕That’s really weird. Sorry, I don’t have many ideas to explain this behavior. Could that be related to one of your Pycharm plugins? Is there any thread involved somewhere? You can use
enqueue=False
although it should be the default (this options writes logs using a thread and hence could explain the overlapped output).It’s not possible, that’s why you have to call
logger.remove()
before adding your own handler.I’m closing this issue because I honestly don’t think the problem is due to Loguru.
If you have other ideas to track down the problem, or can provide more information to further investigate this issue, feel free to reopen this ticket. 👍