I've been writing some software to interface with a camera. This had to be done on Windows because of the equipment drivers. In the end, I wanted to deliver a product to my research group that was easy to use-- e.g. double click on this icon and a camera gui will come up that allows you to view and save images streaming from the camera.
The secret to getting the double-click to work was to make a shortcut to the master script, put the shortcut on the desktop, then right click and choose "open with", "choose default program." You want to set the default program to pythonw.
If that is not in the list of suggested programs, you will need to browse for it. To avoid browsing, you can go to the start menu and search for pythonw. Then right click on pythonw and choose "open file location." Copy the file location and then use that as the location of the program when you click "Browse..." to associate a program with this type of file.
That's all!
If you ever want to edit the .py file instead of running it with the python interpreter (pythonw), you can right click and open with your favorite text editor. I had to make the shortcut because the actual python file is in a directory with other files it needs to access-- I didn't want to put them ALL on the desktop.
No comments:
Post a Comment