I am using Windows. I have files that are AES encrypted and saved with a certain file extension. What I want to do is to write a python program that I can use as the handler for that file type. In other words, when I double-click a file of that type, it should start my python program, which will then process the file. So far I have it to the point where my program runs in response to such a file being opened.
What I am stuck on is this: When I open a file that triggers my handler to run, how do I find the location of that file from within the handler program?
For example:
.abcis associated toC:\Program Files\my_file_handler.py, somy_file_handler.pywill run whenever I double-click a.abcfile- I double-click
C:\Users\my_stuff\cool_aes.abc C:\Program Files\my_file_handler.pyruns
within my_file_handler.py, how do i determine that C:\Users\my_stuff\cool_aes.abc was the file that triggered it to start? Is that information available in sys or os packages, or somewhere else?