ContextMenuGroup ( "Group 1", items = ) ]) # create the group for the current user to be shown on right click of # directory, directory background and for python files cmgroup. DIR_BG ) ) Simple and easy usage import pywin_contextmenu as pycm def test_function ( file_or_dir_name ): print ( file_or_dir_name ) input ( "Press ENTER to continue" ) # create the nested groups to execute direct commands, python functions # and python scripts cmgroup = pycm. ContextMenuGroup ( "Group 1", items = ). create ( rk ) # In a more pythonic way # pycm. DIR_BG ) # Create the group and test group1. ContextMenuItem ( "Clean empty folders", script_cmd ) # add item to the group group1. python_script_cmd ( "scripts/clean_empty_folders.py", rel_path = True, hide_terminal = True ) # create the item item1 = pycm. ContextMenuGroup ( "My python scripts" ) # convert your script into executable command script_cmd = pycm. import pywin_contextmenu as pycm Detailed Usage import pywin_contextmenu as pycm # create a group group1 = pycm. Or you can install this package from pypi using pip install pywin-contextmenuĪnd simply import in your scripts. You can download the pywin_contextmenu.py file from this repository ( ) and place the file in your scripts folder. ![]() A simple and intuitive way to add your custom scripts to your windows right click contextmenu.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |