Hi Andreas,
For now I wrote simple test which runs over all .py and .pml scripts inside specific directory and tries to run them with pymol with -c flag (for now this script doesn't care if python errors appear during run - it only checks that pymol closes as expected). This is made because some of these scripts (located in `data` and `examples` directories in upstream source tree) use data from other directories in relative paths and write to the folder where they are located in. I symlink them to temporary directory. I haven't solved usage of files from relative paths yet, that's why this leads to python exceptions, but pymol still closes as expected.
Incorrect paths are present in installed example scripts, for example, in /usr/share/doc/pymol/examples/generate_amber.py there is a line:
model= io.pdb.fromFile("../../test/dat/pept.pdb")
Since in installation this path is incorrect, this script also raises python exception (but pymol command line closes as expected). I don't know how to deal with these relative files. I can fix as many examples as I could to make them find input parameters correctly when they are installed, or write several examples by myself. What is a better solution?