#!/usr/bin/env python
"""
Quick script to list all installed python packages.

Taken from here:
    https://www.activestate.com/resources/quick-reads/how-to-list-installed-python-packages/
"""
import pkg_resources
installed_packages = pkg_resources.working_set
installed_packages_list = sorted(["%s==%s" % (i.key, i.version) for i in installed_packages])
for installed_package in installed_packages_list:
    parts = installed_package.split("==")
    print(f"{parts[0]:<20} => {parts[1]}")
