I'm trying to call osascript in Python to simulate key presses with something like this:
cmd = """
osascript -e 'tell application "System Events" to keystroke "e"'
"""
os.system(cmd)
How can I send key presses for the up/down/left/right arrow keys?