Giter VIP home page Giter VIP logo

libgphoto2-python's People

Contributors

cclauss avatar dfandrich avatar hfiguiere avatar msmeissn avatar ndim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

libgphoto2-python's Issues

Typos discovered by codespell

% codespell --quiet-level=2

./INSTALL:37: soure ==> source, sure, sore, sour, soured
./gphoto-m4/gp-stdint.m4:610: unsinged ==> unsigned
./gphoto-m4/gp-documentation.m4:67: explicitely ==> explicitly
./gphoto-m4/gp-check-popt.m4:144: specivied ==> specified
./gphoto-m4/gp-check-shell-environment.m4:29: substition ==> substitution
./gphoto-m4/gp-manual-gtk-doc.m4:3: explicitely ==> explicitly

Create file from string

I'm trying to write files containing a UUID to memory cards inside cameras and phones so that I can identify a card that has been seen before when a device is plugged in.

This works:

`#!/usr/bin/python3

#Tag, untag and retag memory cards

import os
import sys
import gphoto2 as gp
from ctypes import *

def main():
cam = gp . Camera ()
cam . init ()
val, tfile = gp . gp_file_open ( "orig.uui" )
p = cam . folder_put_file ( "/store_00010001/DCIM", "elephant.uui",
gp . GP_FILE_TYPE_NORMAL, tfile)
main()

`
It copies a UUID from a text file created by uuidgen to the card in the camera.

However I have completely failed to write a UUID from a Python text string without going via a disk file. I have tried creating a file and using set_data_and_size() but have not found any combination of parameters that will work.

Is there somewhere an example program for set_data_and_size() ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.