#!/usr/bin/env osascript
on run argv
	tell application "iTerm2"
                if number of items in argv is 0 then
			log "Usage: it2run MyScript.py [arg1 [arg2...]]"
                else if number of items in argv is 1 then
			launch API script named (item 1 of argv)
                else
			launch API script named (item 1 of argv) arguments (items 2 through -1 of argv)
		end if
	end tell
end run

