Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

If you're interested in continuing with Python development in Operations (and I hope you are!), here are a couple things you could tackle as intro projects

Making a simple PyDM GUI

Probably the best place to start. If you look at the production Dev Panel, you should see an "Example Dev Panel" on it. If you click it, you'll launch a really simple GUI whose entire function is to print what it's doing. If you look in the example subdirectory, you'll see example.ui and example.py, which together make up that simple GUI. I created example.ui using designer in the exact same way we created our dev panels in the tutorial. The difference here is that the button on opsDevPanel.ui is a shell script button instead of a related display button, and it runs the command "pydm example/example.py" (you can open it up in designer to see). If you look at example.py, you'll see the format for a PyDM GUI:

Image AddedImage Added

Blue: The name of your GUI (and file – whatever name you choose for your GUI, the python file should be [name].py)

Green: The names you gave the UI elements in designer

Red: The custom functions for that GUI! It can be anything you want, this is just an example of a GUI that prints out what you're doing, but you could make a GUI that calculates power or something

Anything not in a box is boilerplate and should be present in any PyDM GUI.

Converting an existing Qt4 Python GUI to PyDM

...