I want to run a multiline AppleScript command from a Python script. For a singleline command I can do:
def stupidtrick(): os.system(cmd) cmd = """osascript -e 'tell app "Finder" to sleep'""" stupidtrick();
however I want to run multiline commands, (such as with multiple 'tell' statements, as in
tell application "iCal" and on the next line,
tell calendar "default" but the same 'set' of commands..
in some other language it was something like:
"code \n" + "line2code \n" + "line3code \n";
how do I accomplish this in python?