Email from Hugo Slepicka
Here are some information that will be useful to get you going at least in the beginning with PyDM using the version deployed in AFS. =========================================== Using PyDM to build and view control system displays =========================================== --------------------------------------- Setting up the environment -------------------------------------- PyDM is installed in /afs/slac/g/lcls/package/pydm/. To get started, you’ll have to source a script that sets up the environment to use the right version of python, the right version of Qt, and sets some environment variables to get things running: [~]$ source /afs/slac/g/lcls/package/pydm/setup_pydm_env.bash ----------------------- Launching PyDM ----------------------- You can use the command ‘pydm.py’ to launch displays: [~]$ pydm.py /afs/slac/g/lcls/package/pydm/current/examples/home.ui There are many examples bundled with PyDM. Most of them use PVs from a little ‘testing’ ioc, also written in python. The testing IOC is in /afs/slac/g/lcls/package/pydm/current/testing-ioc.py You can run that in the background, then open the example files with PyDM: [/afs/slac/g/lcls/package/pydm/current]$ python testing-ioc.py & [/afs/slac/g/lcls/package/pydm/current]$ pydm.py examples/image_view/image.ui ----------------------- Building Displays ----------------------- If you want to make a new display using the drag-and-drop Qt Designer tool, you just have to start designer: [~]$ designer Start building your panel from File -> New… -> Widget. If your environment was set up correctly, you should see a section for ‘PyDM Widgets’ in the widget list on the left side of the window. You can drag and drop widgets from the list onto your blank canvas. On the right is the property inspector. PyDM’s properties are at the bottom of the property list. If you want to make a display with Python code, you make a new python file, import the ‘Display’ class from PyDM, and make a subclass of it. It is probably best to start from an example. A simple example can be found in /afs/slac/g/lcls/tools/pydm/examples/positioner.