Created
September 11, 2017 02:17
-
-
Save masnick/a5b5a4b315f677318517671d5c146458 to your computer and use it in GitHub Desktop.
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
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