Package: shortcutter
ShortcutterShortcutter is a cross platform API for creating shortcuts for python applications meant to be used in setup.py script or as a command line application (fork of the Shortcut).Shortcutter creates shortcucts that activate python environment prior launching the app (activation can be disabled if needed). It supports virtual environments, Anaconda/Miniconda, conda environments,sudo pip install,pip install --user. Shortcutter will do its best to find your app, searching for the usual suspects in the usual places (i.e. those in the PATH), or you can give it a full path.Shortcutter is intended to be used for click/drag'n'drop usage of shortcuts only. Hence do not call/source shortcutter wrapper scripts. If you need executable wrappers from activated environments seeexec-wrappers.But do not call/source them either - use"%COMSPEC%" /c ".\path\to\execwrapper.bat" arg(call path-cmd.bat execwrapper argif it's in the PATH; seethis) on Windows and"./path/to/execwrapper" argon Unix (execwrapper argif it's in the PATH).Additioanlly special command/method can create shortcut to the terminal at activated environment (plus terminal shortcut at conda root). In case of Windows special env vars%u%and%a%defined that switch encodings and%b%var that sets UTF-8 encoding and starts Bash.To create desktop and menu shortcuts forpython:Using the app:shortcutter python
shortcutter --terminalUsing the Python API for example insetup.py:fromshortcutterimportShortCuttersc=ShortCutter()sc.create_desktop_shortcut("python")sc.create_menu_shortcut("python")sc.create_shortcut_to_env_terminal()It was created to solve a simple problem - if you install a python package usingpipthere is no simple way of creating a shortcut to the program it installs.Shortcuts without entry points (for GUI)The default use-case for Shortcutter is to create shortcuts for entry-points executables auto created by setup.py or conda. But sometimes such entry-points do not work (like when using pythonw on macOS with python.app package). See example how to work-around this:Enaml video app(the main idea is inbashscript).Table of contentsShortcutterShortcuts without entry points (for GUI)InstallCommand line interfacePython APIOperating SystemsStatusChange logInstallShortcut is available onpypiand can be installed usingpip:Using Anaconda/Miniconda:conda install -c defaults -c conda-forge shortcutterUsing pip:pip install shortcutterSystem Python 3 on macOS or Linux:pip3 install shortcutterNote: ifpip3 install --user(simplypip3 installon Ubuntu) then you might need to add%APPDATA%\Python\Python36\Scripts(on Windows) /~/.local/bin(on Linux) to the PATH.Shortcutter should work on Python 2 or can easily be bugfixed if you post an issue.Command line interfaceThe-hor--helpoption will display the help:shortcutter --helpusage: shortcutter [-h] [-d] [-m] [-n [NAME]] [-s] [-t] [target]

Automatic shortcut creator. Shortcuts auto-activate their environments by 
default.

positional arguments:
  target                The target executable to create Desktop and Menu
                        shortcuts.

optional arguments:
  -h, --help            show this help message and exit
  -d, --desktop         Only create a desktop shortcut.
  -m, --menu            Only create a menu shortcut.
  -n [NAME], --name [NAME]
                        Name of the shortcut without extension (autoname
                        otherwise).
  -s, --simple          Create simple shortcut without activate wrapper.
  -t, --terminal        Create shortcut to environment with shortcutter (plus
                        shortcut to root environment in case of conda).Python APIPython API.Operating SystemsShortcut support Windows, macOS and Linux.The way shortcuts are provide and applications launched depends on the operating system.Windows.lnkfiles pointing directly to the application paths are created in the User Desktop and Programs folders.macOSmacOS applications are created which run the application via a terminal and copied to the User Desktop (~/Desktop) and Launchpad (/Applications).Linux.desktopfiles are created which start the application via the shell and created in the User Desktop and applications menu (~/.local/share/applications).StatusAlpha - tested and works butissuesmaybe
experienced and API changes are possible.Change logChange log.