My friend's birthday is coming up, so another friend and I are working on a birthday card/prank. We wrote a short Python script that, upon execution, sleeps for a certain amount of time and then launches the virtual birthday card. We want to send our friend a file (say, the day before his birthday), telling him it's a picture of us or something unsuspicious (the filename would of course end in .jpg or something along those lines) but when he opens it, he actually just activates the sleeper (which will then launch the virtual birthday card the next day, or whatever, depending on when we send it) and surprise him on his actual birthday. (He never turns off his computer, so we're not worried about the whole 'sleep' thing.)
So anyway. The trouble is that if we call it filename.jpg, his computer will automatically open it with an image viewer (i.e., Preview if on a Mac). Is it possible for us to programmatically change the default application that attempts to run our program? That is, is it possible for his computer to run the Python file upon him double-clicking (or otherwise attempting to open) the file?