Skip to content

Instantly share code, notes, and snippets.

@david-hodgetts
Last active October 12, 2016 12:24
Show Gist options
  • Save david-hodgetts/16f023b9c6288f126646a82491290a36 to your computer and use it in GitHub Desktop.
Save david-hodgetts/16f023b9c6288f126646a82491290a36 to your computer and use it in GitHub Desktop.
applescript that launches Python's simple http server in the directory containing the script
tell application "Finder"
set cwd_ to folder of (path to me) as alias
set path_ to (POSIX path of cwd_)
tell application "Terminal"
activate
do script ("cd " & quoted form of path_) & ";python -m SimpleHTTPServer"
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment