doc/index.rst

Fri, 18 May 2018 00:07:54 +0200

author
David Douard <david.douard@logilab.fr>
date
Fri, 18 May 2018 00:07:54 +0200
changeset 96
6ff321f0d37d
parent 95
c6b655d9b855
permissions
-rw-r--r--

[readme] rename as README.rst

to make bitbucker happier

.. pygpibtoolkit documentation master file, created by
   sphinx-quickstart on Wed May 16 10:51:57 2018.
   You can adapt this file completely to your liking, but it should at least
   contain the root `toctree` directive.

pygpibtoolkit
=============

pygpibtoolkit_ is a Python_ toolkit for talking with GPIB devices. It
consist in a set of python modules (low-level and some more
high-level) in order to ease writing python code to play with GPIB
devices.

There are also some utility commands and GUI tools written using this
library (and PyQt5 for GUI tools).

The aim of the project is to have an infrastructure that make it easy
to write code to command/interact with GPIB-controlled devices, and,
as a corrolary, make it easy to write "description" code for specific
test equipments.

Quick start
===========

The simplest way to install pygpibtoolkit_ is to use pip_. I strongly recommend
you use virtualenvs_ for this, for example via virtualenvwrapper_ or pew_. Here
is an example session using virtualenvwrapper_ on a Debian stretch machine:

.. code-block:: bash

   david@host:~$ mkvirtualenv -p /usr/bin/python3 pygpib
   Already using interpreter /usr/bin/python3
   Using base prefix '/usr'
   New python executable in /home/david/.virtualenvs/pygpib/bin/python3
   Also creating executable in /home/david/.virtualenvs/pygpib/bin/python
   Installing setuptools, pkg_resources, pip, wheel...done.

   (pygpib) david@host:~$ pip install pygpibtoolkit
   [...]
   Installing collected packages: pyserial, numpy, sip, PyQt5, pyqtgraph, pygpibtoolkit
   Successfully installed PyQt5-5.10.1 numpy-1.14.3 pygpibtoolkit-0.1.0 pyqtgraph-0.10.0 pyserial-3.4 sip-4.19.8
   (pygpib) david@pavo:~$ pygpib-detect --help
   usage: A simple tool for detecting connected GPIB devices [-h] [-d DEVICE] [-v]

   optional arguments:
     -h, --help            show this help message and exit
	 -d DEVICE, --device DEVICE
                           Device of connected Prologix GPIB bundle
                           [/dev/ttyUSB0]
	 -v, --verbose
   (pygpib) david@host:~$ python
   Python 3.5.3 (default, Jan 19 2017, 14:11:04)
   [GCC 6.3.0 20170118] on linux
   Type "help", "copyright", "credits" or "license" for more information.
   >>> from pygpibtoolkit.prologix import GPIB
   >>> from pygpibtoolkit.gpibcontroller import GPIBController
   >>> cnx = GPIB(device='/dev/ttyUSB0')
   >>> ctl = GPIBController(cnx)
   >>> dvm = c.register_device(24, "HP3456A")
   >>> dvm.S0F1 # set DVM to DC Voltage mode



.. toctree::
   :maxdepth: 2
   :caption: Contents:

   introduction
   developer_manual


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

.. _pygpibtoolkit: https://bitbucket.org/dddouard/pygpibtoolkit
.. _Prologix: http://www.prologix.com
.. _Python: http://www.python.org
.. _`user manual`: http://pygpibtoolkit.readthedocs.io
.. _GPIB: https://en.wikipedia.org/wiki/IEEE-488
.. _linux-gpib: https://linux-gpib.sourceforge.io
.. _virtualenvs: https://docs.python.org/dev/library/venv.html
.. _pip: https://packaging.python.org/key_projects/#pip
.. _virtualenvwrapper: http://virtualenvwrapper.readthedocs.io
.. _pew: https://github.com/berdario/pew

mercurial