Discussion:
[gphoto-devel] Beginner: Using libgphoto2, how to find set-config-values?
Karmaschinken
2016-12-19 14:31:41 UTC
Permalink
Hello Jim! Thank you very much for your reply and for providing the
Python-bindings for libgphoto2. I am very happy to be able to setup my
project with your software and the great libgphoto2 from Marcus.

Unfortunately you are really right. I tried to understand what is happening
in the PyQt GUI, but everything is happening in the Widgets, right?

E.g. line 154 and 155 seeem to me to be the ones that save the changed
values back to the config object, right?

149 def new_value(self):
..
154 gp.check_result(gp.gp_widget_set_value(self.config, value))
155 self.config_changed()

I might dig into it and probably would manage to code my program as shown in
the PyQt example, but actually I am not sure if I have to use the "Widgets"?
Are these Widgets meant to be used in a GUI, or are they the prefered way to
go ahead for an app running in a terminal too?

I mean, from within the code I posted above, I was able to see all the names
and the values in the config object, without using widgets. Would I be able
to change the values then too?

Is there any documentation available about what the libgphoto2-structures
are meant to be for and how they are used? I know the API-doc, but this is
just a summary of the function and data structure, without any information,
what they do, or am I missing something?

I admit I am a little bit jealous when having a look at the JAVA-binding
<https://github.com/angryelectron/libgphoto2-jna> . This look so easy:

GPhoto2 camera = new GPhoto2();
camera.open();
GPhoto2Config config = new GPhoto2Config(camera);
config.readConfig();
config.setParameter("burstnumber", "5");
config.setParameter("capturetarget", "Memory card");
config.writeConfig();
camera.close();

There is no way to do it that easy within Python, no?

Thank you very much!

Martin



--
View this message in context: http://gphoto-software.10949.n7.nabble.com/Beginner-Using-libgphoto2-how-to-find-set-config-values-tp16449p16460.html
Sent from the gphoto-devel mailing list archive at Nabble.com.
Karmaschinken
2016-12-21 13:46:54 UTC
Permalink
Jim, thank you very much! I will test at soon as I am back home!

Thanks!



--
View this message in context: http://gphoto-software.10949.n7.nabble.com/Beginner-Using-libgphoto2-how-to-find-set-config-values-tp16449p16472.html
Sent from the gphoto-devel mailing list archive at Nabble.com.
Karmaschinken
2017-01-05 20:07:10 UTC
Permalink
Hello Jim,

I managed to use your Python Bindings for my 5D Mk II. Now there is one
thing I need some help:

I would like to trigger the camera with a cable-remote while being in
LiveView. Now everytime I call "gp.check_result(gp.gp_camera_exit(camera,
context))" LiveView is being ended. Is there any chance to avoid this
behaviour?



--
View this message in context: http://gphoto-software.10949.n7.nabble.com/Beginner-Using-libgphoto2-how-to-find-set-config-values-tp16449p16491.html
Sent from the gphoto-devel mailing list archive at Nabble.com.

Karmaschinken
2016-12-19 22:06:31 UTC
Permalink
Jim , thanks again!

The camera is under control! I would be very happy, if I would not have this
very sad news on the radio. I'm in Berlin, and so is my girl friend. It is
so unbelievable sad.

Thanks again and best wishes.



--
View this message in context: http://gphoto-software.10949.n7.nabble.com/Beginner-Using-libgphoto2-how-to-find-set-config-values-tp16449p16466.html
Sent from the gphoto-devel mailing list archive at Nabble.com.
Karmaschinken
2016-12-19 20:07:36 UTC
Permalink
Once again! Thank you Jim, thank you Marcus!

I am starting to understand how it works! At least I managed to get all
options listed now and also to set the values. That's all what I wanted for
now. Now I have to try if it works with two cameras at once, but since I
already managed to shoot to cameras and download the images, I am convinced
I will get that working too.

Thanks a lot!

Have a nice Christmas time! Best regards. Martin





--
View this message in context: http://gphoto-software.10949.n7.nabble.com/Beginner-Using-libgphoto2-how-to-find-set-config-values-tp16449p16464.html
Sent from the gphoto-devel mailing list archive at Nabble.com.
Loading...