I'm writing a Python script to run in the Terminal on OSX for batch-tagging music files. Once I launch the program, I want to be able to drag and drop batches of directories onto the Terminal, and for the program to processes all the files in the directories.
What I have works fine… so long as I don't drop too may folders onto the Terminal when asked for input. If I drop too many folders on, it gets stuck and I have to terminate. It looks like there's some kind of limit on the length of input to 1024 characters in this circumstance. I've tested it and even just typing/copypasting (rather than dragging/dropping), I cannot input more than 1024 characters.
What is mysterious to me is that if I simply go into Terminal and start up Python there, typing input()
lets me drag and drop an unlimited number of folders. I can save the input into a string and manipulate it however I want.
When I launch my program in Terminal, though, the input()
line no longer works in the same way and has the 1024 character limit.
Can anyone tell me what's going on and how I might be able to run the script in Terminal while being able to drop on as many folders as I want?