-
Notifications
You must be signed in to change notification settings - Fork 46
Recipes
(this recipe was "stolen" from an internal doc from Sergi Rubio)
Warning: this uses an experimental API and may break some widgets
GUI's subscribing to hundred of events may have an slow startup It has been partially solved in Tango > 9.2.6, anyway you may try this recipe to start the GUI in polling mode and subscribe events later.
At the beginning of your __main__
method:
from taurus.qt.qtcore.util.emitter import DelayedSubscriber
print('Disabling events '+'<'*40)
print(type(options.no_tango_events),options.no_tango_events)
taurus.Manager().changeDefaultPollingPeriod(9000)
taurus.Factory('tango').set_tango_subscribe_enabled(0)
To reenable events and start Delayed subscription
print('Reenabling events '+'<'*40)
subscriber = DelayedSubscriber('tango',parent=app,
sleep=10e3,pause=5)
See instructions in the getting started section of the official docs
Then you may either install from a release or install in "develop" mode
Note: the support for py2 and Qt4 will be dropped soon. Unless you specifically need this environment (e.g. if you are not yet ready to replace PyQwt5 by pyqtgraph), you probably should set up a Py3 and Qt5 environment instead (see above)
# create the environment
conda config --add channels conda-forge
conda config --add channels tango-controls
conda create -n py2qt4 python=2 pyqt=4 itango pytango lxml future guidata cython ipython pillow pint ply pyqtgraph pythonqwt numpy scipy pymca click
# activate the environment
conda activate py2qt4
# Install guiqwt from pip (the conda package requires Qt5):
pip install guiqwt
Then you may either install from a release or install in "develop" mode