You can remove text wrapping in a text file using Python by reading the file line by line and concatenating lines that end with a newline character with the next line. Here's an example:
main.py399 chars17 lines
This code reads the file line by line and concatenate the current line with the next line if the current line ends with a newline character. The new lines without text wrapping are then written back to the same file.
Note that this will modify the original file. If you want to preserve the original file, you can write the new lines to a new file instead.
gistlibby LogSnag