In article
<[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (James Henstridge) writes:

| On Fri, 8 Dec 2000, Aaron Optimizer Digulla wrote:
|[...]
|| os.environ['LANG'] = 'ja_JP.ujis'

| This just sets a value in a dictionary.  Anything below python will not
| know about it.

here is the code implementing os.environ on *ix from os.py:

        class _Environ(UserDict.UserDict):
            def __init__(self, environ):
                UserDict.UserDict.__init__(self)
                self.data = environ
            def __setitem__(self, key, item):
                putenv(key, item) # <--
                self.data[key] = item
            def update(self, dict):
                for k, v in dict.items():
                    self[k] = v

this is from 2.0, the 1.5.2 didn't define a update() method
so it didn't work (but __setitem__ did)

os.environ gets set into a dummy empty dictionary if putenv
doesn't exist, though. but it's probably unlikely to
be missing these days...

   -- erno

_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk

Reply via email to