Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

Right click context menu of a file in Python

import sys
import subprocess

def main():
    if len(sys.argv) == 1:
        path = sys.argv[0]
        subprocess.run(['/path/to/my.exe', path])
    else:
        print('Usage myscript.py <path>')

if __name__ == "__main__":
    main()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Right #click #context #menu #file #Python
ADD COMMENT
Topic
Name
4+9 =