Skip to main content

A python module to help creating explorer menus for Windows Explorer.

Project description

Explorer Menu

A python module to help creating explorer menus for Windows Explorer.

How to use

Defining items

Items can either be:

  • Action items - items with a command associated to them
node('Label', 'cmd.exe /K echo action')
  • Container items - items that may contain other container items and/or action items
node('Root Label', node(...), node(...), ...)

Registering items

Simply call the register method of any item and it will be registered, along with all children items:

node('Label', 'cmd.exe /K echo action').register()

node('Root Label', node(...), node(...), node(...)).register()

After items are registered you will be able to find them by right clicking in an empty area of any folder of your Windows Explorer.

Removing items

Simply call the remove method of any item and it will be removed, along with all children items:

node('Label', 'cmd.exe /K echo action').remove()

node('Root Label', node(...), node(...), node(...)).remove()

Example:

from explorermenu.menu_items import node

# a single action item
single_action_item = node('Root action', 'cmd.exe /K echo Root action')

# a nested set of items
nested_set = \
    node('Root',
         node('Child 1',
              node('Grand child 1',
                   node('Grandgrand child 1', 'cmd.exe /K echo Grandgrand child 1 action'),
                   node('Grandgrand child 2', 'cmd.exe /K echo Grandgrand child 2 action'),
                   ),
              node('Grand child 2', 'cmd.exe /K echo Grand child 2 action')
              ),
         node('Child 2', 'cmd.exe /K echo Child 2 action'),
         )

# Register items
single_action_item.register()
nested_set.register()

# Remove items
single_action_item.remove()
nested_set.remove()

Version

v0.1.0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

explorer-menu-0.1.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

explorer_menu-0.1.0-py3-none-any.whl (16.0 kB view details)

Uploaded Python 3

File details

Details for the file explorer-menu-0.1.0.tar.gz.

File metadata

  • Download URL: explorer-menu-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for explorer-menu-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2e6dd95c0a852bddb3b3aa11794fc74ddbd1540f53083f22a1af8d8b17ce4c4f
MD5 e45964f37123c49c715dbc38c2168e18
BLAKE2b-256 f8aa9edf53aea457159228b46f7f02e0d42ea10f4fdbe90e30078946c5126165

See more details on using hashes here.

File details

Details for the file explorer_menu-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: explorer_menu-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 16.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.3

File hashes

Hashes for explorer_menu-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 18fb2cfa38d5e6bdbce02c4400016c88c5a5a6c5b9bd0cd928274ffc14b37121
MD5 3a57eecf19949b71c80fe0ec91f6f5c1
BLAKE2b-256 0347af744993337de9870ef0c9db03a8cc0d32c9544d699f1e811f10c16e1f6c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page