# 7 Programming: flow control

This chapter describes Pyxplot’s facilities for automating repetitive tasks by using loops. At the end, we turn to Pyxplot’s interaction with the shell and filing system in which it operates, introducing a simple framework for automatically re-executing Pyxplot scripts whenever they change, allowing plots to be automatically regenerated whenever the scripts used to produce them are modified.

- 7.1 Conditionals
- 7.2 For loops
- 7.3 Foreach loops
- 7.4 Foreach datum loops
- 7.5 While and do loops
- 7.6 The `break` and `continue` statements
- 7.7 The conditional operator
- 7.8 Subroutines
- 7.9 Macros
- 7.10 The `exec` command
- 7.11 Assertions
- 7.12 Raising exceptions
- 7.13 Shell commands
- 7.14 Script watching: pyxplot_watch