Forum: Poser Python Scripting


Subject: How do you avoid UAC problems writing to poser.AppLocation() subfolders ?

3dcheapskate opened this issue on Apr 23, 2020 ยท 38 posts


ironsoul posted Wed, 29 April 2020 at 2:36 PM

Looks like for most operating systems os.getenv is a wrapper for os.environ but with an optional default parameter that can save a few code lines. Stackoverflow has a discussion here https://stackoverflow.com/questions/16924471/difference-between-os-getenv-and-os-environ-get

os.environ copies the process environment variables at start-up into a dictionary object for ease of use, it might have been getenv was original intended to point directly at the process environment space until someone decided it wasn't a good idea. Modifying the environment space was useful for a child process to communicate to its parent but these days programs use shared memory so its no longer necessary.