On Thu, Jan 17, 2013 at 7:14 AM, Albert-Jan Roskam <fo...@yahoo.com> wrote: > > Thanks for your replies. os.putenv() may be easier than os.environ because, > hopefully, it takes care of the OS-specific separators of the values (";" > for Windows, ":" for Linux, others I don't know but I'd guess they're all > ":").
os.environ wraps the initial posix.environ dict and uses putenv/unsetenv to keep it consistent with the process: http://hg.python.org/cpython/file/70274d53c1dd/Lib/os.py#l391 convertenviron in posixmodule.c (module posix, nt, or os2) populates the initial dict: http://hg.python.org/cpython/file/70274d53c1dd/Modules/posixmodule.c#l442 For the path separator, use os.pathsep or os.path.pathsep: http://docs.python.org/2/library/os#os.pathsep _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor