-
Notifications
You must be signed in to change notification settings - Fork 20
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
long URLs are broken into a multi-line string which is hard to copy #73
Comments
I also have the same problem. There are some long strings in my data which I don't want to split on multiplt string. Is it possible to configure pprint not to split long strings? |
import prettyprinter.pretty_stdlib
@prettyprinter.register_pretty(str)
def pretty_str_custom(v, ctx, *args, **kwargs):
if v.startswith("http://") or v.startswith("https://"):
return prettyprinter.prettyprinter.pretty_single_line_str(v, ctx.indent)
else:
return prettyprinter.pretty_stdlib.pretty_str(v, ctx) Now you're stoked. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
long strings such as URLs are currently broken into multiple lines, with each line surrounded by a single quote. This make it really hard to copy the URL, for example. I tried to use
width
but it didn't do anything.The text was updated successfully, but these errors were encountered: