Created
September 15, 2010 15:15
-
-
Save kotas/580871 to your computer and use it in GitHub Desktop.
CotEditor をシェルから起動するの
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# | |
# Shell command for CotEditor | |
# | |
import sys | |
import os | |
import os.path | |
files = [os.path.abspath(s) for s in sys.argv[1:]] | |
script = """ | |
tell application "CotEditor" | |
activate | |
%s | |
end tell | |
""" % "\n".join([' open "%s"' % path for path in files]) | |
ps = os.popen("osascript", "w") | |
ps.write(script) | |
ps.close() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment