[Python-bugs-list] [ python-Bugs-416225 ] os.environ.has_key fails with lower case
noreply@sourceforge.net
noreply@sourceforge.net
Sun, 15 Apr 2001 13:52:45 -0700
Bugs item #416225, was updated on 2001-04-14 21:45
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416225&group_id=5470
>Category: Python Library
Group: None
>Status: Closed
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Guido van Rossum (gvanrossum)
Summary: os.environ.has_key fails with lower case
Initial Comment:
This looks a bit like #210690. When setting an environ
variable for a child process on windows has_key will
let me down if the environ key is lower case
(on win NT and Windows 2k) python 1.5.2.
Let me show an example:
C:\>python
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit
(Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum,
Amsterdam
>>> import os
>>> os.environ['BLAH'] = "blah blah blah"
>>> os.environ['blah1'] = "blah blah blah"
>>> os.environ['BLAH']
'blah blah blah'
>>> os.environ['blah1']
'blah blah blah'
>>> os.environ.has_key("BLAH")
1
>>> os.environ.has_key("blah1")
0
>>>
----------------------------------------------------------------------
>Comment By: Guido van Rossum (gvanrossum)
Date: 2001-04-15 13:52
Message:
Logged In: YES
user_id=6380
Thanks; this is a known bug in 1.5.2 that has been fixed in
2.0 and later versions. I suggest that you upgrade!
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=105470&aid=416225&group_id=5470