Case sensitive file names
tim.one at comcast.net
Sun Feb 22 18:27:52 CET 2004
> When opening a file with file.open(filename,"r") under Windows,
I'm not sure what you mean. There's a file() builtin and an open() builtin
(which are the same thing), but there's no module named "file", and there's
no "open" attribute on the builtin file object.
> I find that the file name is case sensitive - any error in the case
> leads to the file not being found.
I don't. Please give an example. Here's mine:
Python 2.3.3 (#51, Dec 18 2003, 20:22:39) [MSC v.1200 32 bit (Intel)] on
Type "help", "copyright", "credits" or "license" for more information.
<open file 'tcap.txt', mode 'r' at 0x006A79E0>
<open file 'TcAp.TxT', mode 'r' at 0x006A7620>
<open file 'TCAP.TXT', mode 'r' at 0x006A7FA0>
Case doesn't matter. 'r' is the default mode, and it's exactly the same if
I pass "r" explicitly.
More information about the Python-list