Word Wrap absolutely doesn't work

I have been trying to import After Effects camera tracking data into Blender using a script that generates a Python .py file. The problem when I import the file into the Blender text window, it will not word wrap, making the script impossible to run. I have tried converting the .py file into various text formats, copying pasting, all to no avail. There are hundreds of lines of code so manually finding the end of each line and hitting Enter is not feasible.

What is going on? Is there a way to fix it?

Sounds like the issue is with the script that creates the .py file.
If you wrote the script then fix it
If someone else wrote the script tell them to fix it

What is going on? Is there a way to fix it?

You have failed to supply any info about the original script or even a simplified .py file to review etc etc . Why not ?