Running python from a usb drive
Steve Holden
steve at holdenweb.com
Mon Sep 11 17:44:14 EDT 2006
Uwe Hoffmann wrote:
> Steve Holden schrieb:
>
>>Uwe Hoffmann wrote:
>>
>>
>>>cjl schrieb:
>>>
>>>
>>>
>>>>I do set pythonpath, see above.
>>>>
>>>
>>>is pythonpath really case insensitive on windows ?
>>
>>
>>Only because the Windows filesystem implements case-insensitive
>>semantics. This is nothing to do with Python:
>
>
> no, i mean't the name not the content. Is the handling of the
> env variable pythonpath case insensitive: pythonpath <--> PYTHONPATH.
>
You live and learn. Apparently it is:
C:\Steve\Projects\Python\dbimp>set SCREWUP="This is Windows"
C:\Steve\Projects\Python\dbimp>python
Python 2.4.2 (#67, Sep 28 2005, 12:41:11) [MSC v.1310 32 bit (Intel)] on
win32
Type "help", "copyright", "credits" or "license" for more information.
Started with C:/Steve/.pythonrc
>>> import os; print os.environ["screwup"]
"This is Windows"
>>>
It turns out that there's code in os.py specifically for os2 and NT
systems, wherein a subclass of userDict is declared that used
case-insensitive pattern matching:
>>> os.environ.__class__
<class os._Environ at 0x0098CCC0>
>>>
regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC/Ltd http://www.holdenweb.com
Skype: holdenweb http://holdenweb.blogspot.com
Recent Ramblings http://del.icio.us/steve.holden
More information about the Python-list
mailing list