gruns / icecream

🍦 Never use print() to debug again.
MIT License
9.22k stars 187 forks source link

Disable/Delete line wrap #139

Open KarlRW opened 1 year ago

KarlRW commented 1 year ago

There are two issues that mention line wrap (linked below). I'm making this issue because I think disabling/deleting line wrap is going to be easier to code than the other two issues. Most editors can handle line wrapping for you. Having a specific wrap hard coded in makes IC not very nice to use.

Even a hacky way to disable/delete it would be nice if someone figured it out.

https://github.com/gruns/icecream/issues/90 - This one has mention of disabling line wrap but its buried under a more complex request. https://github.com/gruns/icecream/issues/60 - The main problem... if we could set line wrap to 2000 it would be the same as disabling.

Gleiphnir commented 1 year ago

Copied reply from #60

preferredWidth = 2000
pp = pprint.PrettyPrinter(width=preferredWidth)
ic.configureOutput(argToStringFunction=pp.pformat)
ic.lineWrapWidth = preferredWidth