Sunday, 4 March 2018

Python - Creating shortcuts

I was recently working on the mu project (a Python IDE for beginners), which is super easy to install using pip, but there is no way to automate the creation of desktop and menu shortcuts.

This seemed like a really big miss, shortcuts are the usual way for people (and certainly beginners to launch applications).

So I set to creating a really simple way of creating shortcuts for Python applications.

Enter shortcut, a X platform (Windows, MacOS, Linux, Raspberry Pi) Python module for automatically creating shortcuts.

Its really simple to install and use:
pip3 install shortcut
shortcut name_of_app
It will find the location of the app and create desktop and menu shortcuts for it.

There is also a Python API which can be used to do the same:
from shortcut import ShortCutter
s = ShortCutter()
s.create_desktop_shortcut("python")
s.create_menu_shortcut("python")
You will find documentation at shortcut.readthedocs.io and code at github.com/martinohanlon/shortcut.

3 comments:

  1. Every time I tried to get done my programming homework I had to admit that the mission is impossible. Your article can be useful only for the person who understand it or at least is interested in it. If you don’t wanna fight with this wall I’d like to recommend you Assignment Expert . These guys are professionals and can help you not only with programming, but also with Chemistry, English, Economics, Physics and many more subjects and the prices are pocket-friendly.

    ReplyDelete
  2. Students can get easily Australian students assignment help services from professionals? You just have to come at StudentsAssignmentHelp.com and get top quality academic writing help. Our writers achieve all your academic deadlines and make sure you do not miss out any.

    ReplyDelete