Here's the error being logged:
- Code: Select all
5/1/12 1:31:30.225 PM [0x0-0x16d16d].com.noodlesoft.HazelHelper: Python error: <stdin> is a directory, cannot continue
And here's the script (saved as it's own file—not embedded (although I tried that too to same effect)):
- Code: Select all
#!/usr/bin/python
import sys
import urllib
import syslog
import os
syslog.openlog("system")
file = sys.argv[1]
encFile = urllib.quote(file)
encFile = os.path.basename(encFile)
url = "http://dl.dropbox.com/u/obscured/" + encFile
cmd = "echo %s | pbcopy" % url
os.system(cmd)
cmd = '/usr/local/bin/growlnotify -n "script" -a "Terminal.app" -m "Dropbox URL copied for\n%s"' % os.path.basename(file)
syslog.syslog(syslog.LOG_INFO, cmd)
os.system(cmd)
syslog.closelog()
Any ideas?