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

Ugly output #89

Closed
hutnerdiogo opened this issue Jun 21, 2021 · 4 comments
Closed

Ugly output #89

hutnerdiogo opened this issue Jun 21, 2021 · 4 comments

Comments

@hutnerdiogo
Copy link

hutnerdiogo commented Jun 21, 2021

I don't know why, but the output is going to the next line:

from icecream import ic
from datetime import datetime
import time


def square(num):
    return num*num

def now():
    return f'[Debug | {datetime.now()}]'

#ic.disable()
#ic.enable()

ic.configureOutput(prefix=now(),includeContext=True)
b = 2
a = ic(square(b))
ic(f'Iniciando Y {b}')
time.sleep(10)

(its just a test file)
but the exit is that:
image
what I can do to have all in one line like ->

[ Icecream.py:16 in <module> | 2021-06-21 09:18:48.044729 ] square(b): 4
@alexmojaki
Copy link
Collaborator

Try ic.lineWrapWidth = float('inf'). Don't know why this isn't documented.

@hutnerdiogo
Copy link
Author

Oh thats work, thanks!

@gruns
Copy link
Owner

gruns commented Jun 21, 2021

created #90 to avoid ic.lineWrapWidth entirely when the terminal width can be determined

@ranelpadon
Copy link

ranelpadon commented Feb 8, 2023

@alexmojaki @gruns looks like this is not working anymore with the latest version?

ic.lineWrapWidth = 1000

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

4 participants