Ahoy!
On Do, 2009-11-12 at 06:34 +0300, Khalid Al-Ghamdi wrote:
> can anyone tell me why on python 2.6 i can enter os.environ and then
> get all the items that that pertain to the os while on python 3 you
> just get the following:
> <os._Environ object at 0x01B18D90>
> with no items?
Seems like os.environ has changed a little since Python 2.x. Try this:
>>> import os
>>> for env in os.environ:
... print('%s: %s' % (env, os.environ[env]))
That should do the trick.
Cheers,
Alan
_______________________________________________
Tutor maillist - [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor