![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
#2
|
|||
|
|||
If you are manually placing the \n characters in your text file, then you will need to use the following code to manually escape special characters (e.g \n):
Code:
s = s.decode('string_escape') Code:
import textwrap s = '\n'.join(textwrap.wrap(s,100)) #Wrap every 100 characters |
Tags |
formatting, infobox, newline, text, wordwrap |
|
|