shortcuts

How do you create a shortcut from within python? Any help appreciated.