From: Jean-Baptiste B. <ash...@gm...> - 2007-04-25 19:50:45
|
I'm adding some other things : At compilation : running build running build_ext building 'gphoto2' extension creating build creating build/temp.linux-i686-2.5 gcc -pthread -fno-strict-aliasing -DNDEBUG -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fomit-frame-pointer -march=i586 -mtune=generic -fasynchronous-unwind-tables -g -fPIC -I/usr/include/python2.5 -c gphoto2.c -o build/temp.linux-i686-2.5/gphoto2.o gphoto2.c: In function '__pyx_f_7gphoto2_library_version': gphoto2.c:161: warning: assignment from incompatible pointer type gphoto2.c:167: warning: assignment from incompatible pointer type gphoto2.c: In function '__pyx_f_7gphoto2_10cameraList___getitem__': gphoto2.c:652: warning: passing argument 3 of 'gp_list_get_name' from incompatible pointer type gphoto2.c:659: warning: passing argument 3 of 'gp_list_get_value' from incompatible pointer type gphoto2.c: In function '__pyx_f_7gphoto2_6camera_download_file_to': gphoto2.c:1840: warning: passing argument 2 of 'gp_file_get_data_and_size' from incompatible pointer type creating build/lib.linux-i686-2.5 gcc -pthread -shared build/temp.linux-i686-2.5/gphoto2.o -L/usr/lib/python2.5/config -lgphoto2 -lpython2.5 -o build/lib.linux-i686-2.5/gphoto2.so when launching gptest.py : -> a cross appear I have to click to go on. -> then : ./gptest.py ./gptest.py: line 20: syntax error near unexpected token `(' ./gptest.py: line 20: `print "GPhoto version "+gphoto2.version()' An idea ? Clear skies, JB 2007/4/19, Jean-Baptiste BUTET <ash...@gm...>: > Hi all :) > > I'm just beginning in python, and try to use python bindings for gphoto2. > > So I dl SVN libgphoto2-devel/bindings trunk, and compile it. > > I'm using python 2.5 > > I have some little issue (because of my porr knowledge ...) > I don't find any documentation about bindings... Could someone explain > me how to obtain this ? > > For example : Just printing version as in gptest.py : > > import gphoto2 > gg= gphoto2.version > print gg > > > -->results : > Traceback (most recent call last): > File "./hh.py", line 2, in <module> > gg= gphoto2.version() > AttributeError: 'module' object has no attribute 'version' > > I've tried regardin what "nm" of gphoto2.so tells... nothing here. > [jb@localhost ~]$ nm /usr/lib/python2.5/site-packages/gphoto2.so | grep -i vers > 00007e50 t __pyx_f_7gphoto2_library_version > 0000c504 b __pyx_n_library_version > 000020a0 t __pyx_tp_traverse_7gphoto2_abilities_list > 000020c0 t __pyx_tp_traverse_7gphoto2_camera > 00002080 t __pyx_tp_traverse_7gphoto2_cameraAbilities > 00002040 t __pyx_tp_traverse_7gphoto2_cameraList > 00002000 t __pyx_tp_traverse_7gphoto2_portInfo > 00002020 t __pyx_tp_traverse_7gphoto2_ports > U gp_library_version > > what can I use ? > > Thanks a lot, > > Clear skies. > > JB > > > > > > > > > -- > http://astrolix.org > association des linuxiens astronomes > -- http://astrolix.org association des linuxiens astronomes |