Skip to content Skip to sidebar Skip to footer

Windows "open With" Python Py2exe Application

I wonder how the Windows 'Open file with...' feature works. Or rather, how would do if I write a program in python, compile a executable with py2exe and then want to be able to ope

Solution 1:

Yep, the path to the file gets passed in as an argument and can be accessed via sys.argv[1].

Solution 2:

You can use more functionally argparse module

Post a Comment for "Windows "open With" Python Py2exe Application"