📜  在 Python 中右键单击文件的上下文菜单 - 无论代码示例

📅  最后修改于: 2022-03-11 14:59:11.195000             🧑  作者: Mango

代码示例1
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 ')

if __name__ == "__main__":
    main()