I would say that this is a limitation / error with OSX Terminal - try running a script with login via IDLE and see if you are still facing the same problem.
As for the best ways to work with a large input - it completely depends on your requirements, but some methods may be:
- Import text from file
- Create some kind of GUI / interface for handling text input with more user-friendly controls.
source share