Is there a way to configure the latest OS X system so that python scripts automatically perform drag and drop functions? If not, what is the easiest way (perfect for scripting) to configure individual scripts for this behavior?
On Windows, I can simply drag and drop files onto a python script, and the python process will sys.argv with the sys.argv path names of the discarded arguments available in sys.argv . Surprisingly, this does not happen in OS X, but there seems to be no way to configure the system for this automatically. All the solutions I came across include porting each of my scripts to the application.
Of course, this question was asked and answered earlier. But I can find not only one single answer that could be included to enable drag and drop for one script at a time (by adding an application around them); it seems that all answers are outdated and / or dependent on broken links. Here's the sampler:
As already mentioned, none of them seem to work anymore. I have OS X 10.8, Mountain Lion, and I saw zilch, from which you could expect later versions of the OS. Any modern solutions?
PS: Conceptually, this question is not necessarily limited to python: I am sure that any mechanism that will work with shell or perl scripts will also work with python. But considering how complicated this sounds like OS X, I keep this question specific since my use case, and all the solutions I saw seem to be linguistic.
source share