First time here? Check out the FAQ!

Ask Your Question
1

How to set printing width for 'print' function?

asked 10 years ago

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

This code:

print 'X' * 140

Shows 2 actual lines with wrap simbol:

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I have screen wide enough to handle 140 character so I woul like to have the string intact and see it as one string. How to set printing width to a custom value?

Preview: (hide)

1 Answer

Sort by » oldest newest most voted
1

answered 10 years ago

slelievre gravatar image

If you are working in the Sage Notebook, you can click on the left of the output to cycle between line-wrapped output, non-line-wrapped output, and hidden output. Otherwise, tell us more about your setup.

Preview: (hide)
link

Comments

That's a good word, I did forget about this, and maybe it needs to be more widely mentioned.

kcrisman gravatar imagekcrisman ( 10 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 10 years ago

Seen: 758 times

Last updated: Mar 12 '15