wiki:PythonExamples

Example Python EPICS GUI projects

Sometimes people ask for examples of Python code to learn how to build GUI programs. This is my response to one such request.

Here are links to several example Python programs with GUIs at the APS. All of these use EPD (Enthought Python Distribution)] that we provide on /APSshare/epd. The tool development seems to be shifting towards Qt-based tools rather than wxPython. The widget set is better and easier to use than wxPython, the documentation has come up in quality, and the license model is now favorable. Both wxPython and PySide are provided in EPD. Do not even think of using Tkinter as the GUI for new python development.

Probably my best example at this time is the motorqt-demo described below. The shortest example at this time is the pyside_probe code below.


using Enthought's TraitsUI

I do *not* suggest you use TraitsUI unless your app is very simple.

traits_probe

  • example of EPICS Probe application
  • uses Enthought's TraitsUI for the GUI, as simple a GUI as it gets
  • source code

PvMail


using wxPython

wxPython is popular now. Consider PySide? or PyQt? as an alternative.

wxPython widgets for EPICS

GSAS-II (aka, pyGSAS, GSAS-2)

  • General Structure Analysis Software from Robert B. Von Dreele
  • documentation
  • GSAS-II is a larger project, if you want an example to see how to build a GUI, look at something smaller

Absorb

mda2idd_report


using PySide or PyQt or PyQt4

pyside_probe

https://subversion.xray.aps.anl.gov/bcdaext/qtprobe-demo/docs/build/html/_images/pyside-probe-gui.png

motorqt-demo

https://subversion.xray.aps.anl.gov/bcdaext/bcdaqwidgets/trunk/src/motorqt-demo/doc/motor_qt.png

bcdaqwidgets

  • provides EPICS-aware Qt widgets to use when building a GUI
    • not intended as example code
  • project under current development (no built docs yet)
  • intended to be a library tool for APS EPICS beam lines
  • intend to add to /APSshare/epd in the near future
  • https://subversion.xray.aps.anl.gov/bcdaext/bcdaqwidgets/trunk/src/bcdaqwidgets/
  • uses PySide (a Qt4 alternate now in /APSshare/epd)
  • uses PyEpics from Matt Newville at CARS (in /APSshare/epd)

new python uniscripts


Last modified 8 years ago Last modified on Aug 1, 2013 12:46:35 PM