Giter Club home page Giter Club logo

chdkptp.py's Introduction

chdkptp.py

Python bindings for chdkptp via an embedded, thread-safe Lua runtime (thanks to Stefan Behnel's lupa).

Requirements

  • C compiler
  • Lua 5.2, with headers
  • libusb, with headers
  • lupa, installed with the --no-luajit flag

Currently chdkptp.py only works when the lupa package is linked to Lua. However, by default the package links to LuaJIT, so make sure that you install it with the --no-luajit flag. It is best to do this via pip, before you install chdkptp.py:

$ pip install lupa --install-option='--no-luajit'

Documentation

Please refer to the API documentation on readthedocs.org

Installation

Currently, only manual installation is fully functional. For other ways to install this package see https://github.com/5up3rD4n1/chdkptp.py

Manual Installation ==================

I highly suggest to create a virtual env before installing the package(this will avoid permission errors):

$ python3 -m venv ~/.virtualenvs/chdkptp

Activate the environment:

$ source ~/.virtualenvs/chdkptp/bin/activate

To leave the virtual env just run:

$ deactivate

Now clone the repo with all the submodules:

$ git clone --recursive -j8  https://github.com/jairomelo/chdkptp.py.git

Get into the repo:

$ cd chdkptp.py

Install lupa dependency:

$ pip install lupa --install-option='--no-luajit'

Install other dependencies:

$ pip install six

Prepare the package with the python3 distutils command:

$ python setup.py sdist

And finally install the package:

$ python setup.py install

Now you can use chdkptp simply running:

>>> import chdkptp
>>> chdkptp.list_devices()
[]
>>>

NOTE: if you installed the package and you are inside the repo dir and try to import chdkptp, it will probably throw an error because python is loading the local dir module not the installed one.

Developers

This package was developed by @jbaiter and updated by @5up3rD4n1

chdkptp.py's People

Contributors

5up3rd4n1 avatar duerig avatar jairomelo avatar jbaiter avatar

Watchers

 avatar

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.