Skip to content

Instantly share code, notes, and snippets.

@masnick
Created September 11, 2017 02:17
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save masnick/a5b5a4b315f677318517671d5c146458 to your computer and use it in GitHub Desktop.
Save masnick/a5b5a4b315f677318517671d5c146458 to your computer and use it in GitHub Desktop.
tell application "Keyboard Maestro Engine"
--- GET VARIABLE ---
-- IF KM Variable does NOT exist, the AS Variable will be set to empty string --
set the_path to getvariable "Path"
end tell
tell application "iTerm"
activate
create window with default profile
try
set _session to current session of current window
on error
set _term to (make new terminal)
tell _term
launch session "Default"
set _session to current session
end tell
end try
tell _session
write text "pyenv data && ipython -i --c=\"import pickle; x = pickle.load(open('"& the_path & "', 'rb'))\""
end tell
end tell
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment