This is one way to do it. Of course with the new property in place, we could probably change a lot of code in the UI class to use self.environ instead of os.environ, although it will likely not make a difference as the variables accessed are typically not of the "request kind".