Skip to main content

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()

Building commands

You can also use the cmd(command, keep_cmd_window=False) method to create commands:

from explorermenu import cmd

# explicitly invoking cmd.exe
node('Label', 'cmd.exe /K echo action')

# same as above, but building command with cmd() method
node('Label', cmd('echo action', keep_cmd_window=True))

Example:

from explorermenu.menu_items import node
from explorermenu import cmd

# a single action item
single_action_item = node('Root action', cmd('echo Root action', keep_cmd_window=True))

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

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

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

Version

v0.4.0

Metadata

Release files for explorer-menu 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for explorer-menu 0.4.0
File Size Uploaded
explorer-menu-0.4.0.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for explorer-menu 0.4.0
File Interpreter ABI Platform
explorer_menu-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.2 kB

Release files / explorer-menu-0.4.0.tar.gz

Download URL explorer-menu-0.4.0.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
29ffc353637a1661b7aedfd5075abf946a8918b9a4154d078241761e75000d2b
BLAKE2b-256 checksum
How to use checksums
f74c6ce49c0ed745d60d47ed73b1ca1d97d48735e24353d98da466027b556df3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Release files / explorer_menu-0.4.0-py3-none-any.whl

Download URL explorer_menu-0.4.0-py3-none-any.whl
Size 16.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e3d5965e244966b8ab6790d048200c2b12df0fb9f013c6f72435cb45c56cca6a
BLAKE2b-256 checksum
How to use checksums
cf72b06f774804a757e3ce08f5a125d2c96a5bc5bf06923d4288d3f2f28fb9d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page