I wrote a python script and have been running it in terminal on Mac OS X snow leopard using python2.6. I used raw_input() to import text in several places, but I seem to reach a limit where it will no longer accept any more characters.
Is this a limit in python raw_input() or is this something to do with Terminal or Mac OSX?
Is there a better way to have the user input larger amounts of text in python?
I’d say it’s a limitation/bug with the OSX Terminal – try running the script with input via IDLE and see whether you still hit the same problem.
As for better ways of dealing with large input – it totally depends on your requirements but some ways could be: