Commit 589b714c authored by Mark J. Blair's avatar Mark J. Blair

Initial commit of pyhidapi.

parents
*~
*.pyc
.DS_Store
build
dist
MANIFEST
AUTHOR
Mark J. Blair, NF6X <nf6x@nf6x.net>
This diff is collapsed.
This diff is collapsed.
#!/usr/bin/env python
#
##########################################################################
# Copyright (C) 2014 Mark J. Blair, NF6X
#
# This file is part of pyhidapi.
#
# pyhidapi is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pyhidapi is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pyhidapi. If not, see <http://www.gnu.org/licenses/>.
##########################################################################
"""Python binding for the hidapi library."""
__all__ = ['hidapi']
__version__ = '1.0.0'
__copyright__ = 'Copyright (C) 2014 Mark J. Blair, released under GPLv3'
__pkg_url__ = 'http://www.nf6x.net/tags/pyhidapi/'
__dl_url__ = 'https://github.com/NF6X/pyhidapi'
from hidapi import *
This diff is collapsed.
#!/usr/bin/env python
#
##########################################################################
# Copyright (C) 2014 Mark J. Blair, NF6X
#
# This file is part of pyhidapi.
#
# pyhidapi is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pyhidapi is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pyhidapi. If not, see <http://www.gnu.org/licenses/>.
##########################################################################
"""Enumerate all HID devices on the system."""
import hidapi
if __name__ == '__main__':
hidapi.hid_init()
print 'Loaded hidapi library from: {:s}\n'.format(hidapi.hid_lib_path())
for dev in hidapi.hid_enumerate():
print '------------------------------------------------------------'
print dev.description()
#!/usr/bin/env python
#
##########################################################################
# Copyright (C) 2014 Mark J. Blair, NF6X
#
# This file is part of pyhidapi.
#
# pyhidapi is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# pyhidapi is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with pyhidapi. If not, see <http://www.gnu.org/licenses/>.
##########################################################################
"""Installation script for pyhidapi.
pyhidapi is a Python binding for hidapi, which is a library for
communicating with USB HID hardware in a platform-independent manner.
Usage examples:
Install in your user directory:
./setup.py install --user
Install in the system default location:
sudo ./setup.py install
Install under /usr/local:
sudo ./setup.py install --prefix /usr/local
Create a source distribution:
./setup.py sdist
"""
from distutils.core import setup
from hidapi import __version__, __pkg_url__, __dl_url__
setup(name = 'pyhidapi',
version = __version__,
description = 'Python binding for hidapi library.',
author = 'Mark J. Blair',
author_email = 'nf6x@nf6x.net',
url = __pkg_url__,
download_url = __dl_url__,
license = 'GPLv3',
packages = ['hidapi'],
scripts = ['hidapi_enum.py'])
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment