jim-easterbrook / python-gphoto2

Python interface to libgphoto2
GNU Lesser General Public License v3.0
359 stars 59 forks source link

An example for wait_event_and_download #79

Closed goktugbasaran closed 5 years ago

goktugbasaran commented 5 years ago

This piece of code aims to represent an example for wait_and_capture_event. It waits for the capture to arrive and then saves the file to the desired location instead of SD card,

jim-easterbrook commented 5 years ago

Can you clean it up a bit: Drop use of context as it isn't needed unless you use callbacks. Use the "oo" interface consistently. Add a comment at the start to say what it does. Use the named constant GP_EVENT_FILE_ADDED in your test of the returned event type.

Note also that the timeout parameter to gp_camera_wait_for_event is in milliseconds, not seconds.

goktugbasaran commented 5 years ago

On it...