Ask Your Question
1

How to set printing width for 'print' function?

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

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?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2015-03-12 16:15:53 +0100

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

Comments

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 +0100 )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

Stats

Asked: 2015-03-12 12:51:58 +0100

Seen: 735 times

Last updated: Mar 12 '15