Ask Your Question

How to set printing width for 'print' function?

asked 2015-03-12 12:51:58 +0200

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 16:15:53 +0200

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.

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 21:17:24 +0200 )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 12:51:58 +0200

Seen: 642 times

Last updated: Mar 12 '15