Implementation in #13 doesn't use os.environ (it reads parameters from 'splash.defaults' and from command line), so I don't want to bother improving this solution as it will be thrown away.

I agree that accessing os.environ once will lead to a more clear code because os.environ is at wrong level of abstraction. But practically this doesn't matter here because this code is going to be thrown away, os.environ is populated on import, and the access is very fast (about 1.5mln gets/sec on my notebook).