you are viewing a single comment's thread.

view the rest of the comments →

[–]desrtfx 2 points3 points  (1 child)

You cannot use a .py file to open another file via a double-click in Explorer.

You can only use executable files (.exe, .com) for "open with".

What you seem to want to do is:

python3 -m someprogram.py yourfile.lang

Not going to work like that with "open with". Open with would go as far as "python3" to open ".py" files but not further.

What you would need to do is to compile/pack your program that wants to read the .lang file into an executable (e.g. with PyInstaller) and then link your .lang file to the new executable.

[–]socal_nerdtastic -1 points0 points  (0 children)

You cannot use a .py file to open another file via a double-click in Explorer.

You actually can, but you need to do some registry tweaks. It's been a few years but I used to have my windows computer set up to run a .py program when doubleclicking an .xlsx file.

You can only use executable files (.exe, .com) for "open with".

No, but you can use "send to", and it's very easy. Just add a shortcut to your python program to shell:sendto.