Ask Your Question

How to set printing width for 'print' function?

asked 2015-03-12 06:51:58 -0600

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:


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?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2015-03-12 10:15:53 -0600

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.

edit flag offensive delete link more


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

kcrisman gravatar imagekcrisman ( 2015-03-12 15:17:24 -0600 )edit

Your Answer

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

Add Answer

Question Tools


Asked: 2015-03-12 06:51:58 -0600

Seen: 260 times

Last updated: Mar 12 '15