Go to file
Colin Baumgarten b420099bd5 Fix crash when running pyqtgraph with python -OO
Running pyqtgraph with python -OO gives the following crash

colin@desktop:~$ python3 -OO -c 'import pyqtgraph'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.5/dist-packages/pyqtgraph/__init__.py", line 216, in <module>
    from .graphicsItems.HistogramLUTItem import *
  File "/usr/local/lib/python3.5/dist-packages/pyqtgraph/graphicsItems/HistogramLUTItem.py", line 10, in <module>
    from .GradientEditorItem import *
  File "/usr/local/lib/python3.5/dist-packages/pyqtgraph/graphicsItems/GradientEditorItem.py", line 354, in <module>
    class GradientEditorItem(TickSliderItem):
  File "/usr/local/lib/python3.5/dist-packages/pyqtgraph/graphicsItems/GradientEditorItem.py", line 480, in GradientEditorItem
    @addGradientListToDocstring()
  File "/usr/local/lib/python3.5/dist-packages/pyqtgraph/graphicsItems/GradientEditorItem.py", line 30, in dec
    fn.__doc__ = fn.__doc__ + str(Gradients.keys()).strip('[').strip(']')
TypeError: unsupported operand type(s) for +: 'NoneType' and 'str'

The cause is the @addGradientListToDocstring() annotation in
GradientEditorItem.py that cannot handle functions without docstrings as
produced when using the python -OO option.

Fix this by only adding the gradient list to the docstring if the docstring is
not None.
2017-01-04 21:48:00 +01:00
doc PyQtGraph release 0.10.0 2016-11-04 22:47:56 -07:00
examples really actually fix 2016-12-14 10:19:01 -08:00
pyqtgraph Fix crash when running pyqtgraph with python -OO 2017-01-04 21:48:00 +01:00
tools Fixes to --publish option in pg-release script 2016-11-07 17:57:23 -08:00
.coveragerc MNT: hard code the coverage report location 2015-08-01 11:54:15 -04:00
.gitignore TST: Attempt 1 at breaking out ViewBox tests 2015-07-31 11:08:14 -04:00
.mailmap cleaner mailamp 2013-09-12 12:36:02 +08:00
.travis.yml force pyqt4 install in travis (conda now defaults to pyqt5) 2016-11-01 15:25:54 -07:00
CHANGELOG PyQtGraph release 0.10.0 2016-11-04 22:47:56 -07:00
CONTRIBUTING.txt DOC: Add instructions for running the test suite 2015-07-12 14:07:10 -05:00
LICENSE.txt - Major reorganization; we now follow the standard python package structure. 2012-12-26 17:51:52 -05:00
MANIFEST.in manifest corrections 2014-12-24 11:05:05 -05:00
README.md Update contributors list 2016-09-14 21:59:41 -07:00
setup.py fix optics demo on python3 2016-10-18 08:47:38 -07:00

Build Status codecov.io

PyQtGraph

A pure-Python graphics library for PyQt/PySide

Copyright 2012 Luke Campagnola, University of North Carolina at Chapel Hill

http://www.pyqtgraph.org

Maintainer

Contributors

  • Megan Kratz
  • Paul Manis
  • Ingo Breßler
  • Christian Gavin
  • Michael Cristopher Hogg
  • Ulrich Leutner
  • Felix Schill
  • Guillaume Poulin
  • Antony Lee
  • Mattias Põldaru
  • Thomas S.
  • Fabio Zadrozny
  • Mikhail Terekhov
  • Pietro Zambelli
  • Stefan Holzmann
  • Nicholas TJ
  • John David Reaver
  • David Kaplan
  • Martin Fitzpatrick
  • Daniel Lidstrom
  • Eric Dill
  • Vincent LeSaux

Requirements

  • PyQt 4.7+, PySide, or PyQt5
  • python 2.6, 2.7, or 3.x
  • NumPy
  • For 3D graphics: pyopengl and qt-opengl
  • Known to run on Windows, Linux, and Mac.

Support

Post at the mailing list / forum

Installation Methods

  • To use with a specific project, simply copy the pyqtgraph subdirectory anywhere that is importable from your project. PyQtGraph may also be used as a git subtree by cloning the git-core repository from github.
  • To install system-wide from source distribution: $ python setup.py install
  • For installation packages, see the website (pyqtgraph.org)
  • On debian-like systems, pyqtgraph requires the following packages: python-numpy, python-qt4 | python-pyside For 3D support: python-opengl, python-qt4-gl | python-pyside.qtopengl

Documentation

There are many examples; run python -m pyqtgraph.examples for a menu.

Some (incomplete) documentation exists at this time.

  • Easiest place to get documentation is at http://www.pyqtgraph.org/documentation
  • If you acquired this code as a .tar.gz file from the website, then you can also look in doc/html.
  • If you acquired this code via GitHub, then you can build the documentation using sphinx. From the documentation directory, run: $ make html

Please feel free to pester Luke or post to the forum if you need a specific section of documentation to be expanded.