I'd prefer fetching the OpenPGM root/version once, and then using Python split/string replacement. It makes the full paths being used more explicit in e.g. logs messages:

```
import os
openpgm_root = os.environ['EBROOTOPENPGM']
openpgm_ver = os.environ['EBVERSIONOPENPGM']
...
```