1

Example

long_string = "I dont want this string to be splitted"
print(long_string)

If I print the string and the console is fullscreen, everything is fine. Output:

I dont want this string to be splitted

But when the console is small and the string doesn't fit, the following happens. Output:

I dont want this stri
ng to be splitted

This just looks really ugly. Is there a way to avoid it?

Thank you.

chrizator
  • 71
  • 1
  • 9
  • What do you want to do to resolve it? Split it by word? If the word is too long, how are you going to resolve that? – Willem Van Onsem Jun 17 '17 at 15:13
  • By default you can set the size of the console, so it does'nt give that output – Stack Jun 17 '17 at 15:14
  • If possible, splitting the output by char would be an option. But setting a default size for the window isn't really what I want. For instants `airodump-ng` does a good job splitting the output by character. – chrizator Jun 17 '17 at 15:20
  • related: https://stackoverflow.com/questions/22782703/how-to-get-terminal-size-or-font-size-in-pixels – enedil Jun 17 '17 at 15:30
  • What do you mean by "splitting the output by char"? Do you mean keeping whole words together, if possible, where "words' are separated by spaces? – Rory Daulton Jun 17 '17 at 15:30

0 Answers0