I've written a bunch of Python scripts that I use periodically while at my
computer and would like to be able to launch them from Quicksilver. I know
that I can do either of these:
- Find a script in the first ("Item") box and select "Run a Shell
Script" as an action
- Write an AppleScript that does something like do shell script
"~/anaconda/bin/python ~/bin/foo.py"
If I simply select "foo.py" in the Item pane and then use the Open action,
it doesn't work. This is what I'd like to be able to do, and even better
I'd like to be able to specify arguments for the command.
I haven't found much on the about this topic, but here is a discussion from
2008 that looks like it's about doing the same in
Ruby<http://www.velocityreviews.com/forums/t853715-launch-ruby-script-from-quicksilver.html>.
I haven't been able to get their solution to work, either with the Ruby
code from the discussion or with my Python translation of it:
#!/Users/kuzzooroo/anaconda/bin/python
import random, os
fname = os.path.expanduser("~/Desktop/test_") + str(random.randint(0, 65536))
with file(fname, 'a'):
os.utime(fname, None)
The she-bang on this script is correct, I've given myself execute
permissions on it, and it works from the command line.
--
You received this message because you are subscribed to the Google Groups
"Quicksilver" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/blacktree-quicksilver.
For more options, visit https://groups.google.com/d/optout.