A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-September/104026.html below:

[Python-Dev] os.path.normcase rationale?

[Python-Dev] os.path.normcase rationale? [Python-Dev] os.path.normcase rationale?Chris Withers chris at simplistix.co.uk
Fri Sep 24 12:13:46 CEST 2010
On 18/09/2010 23:36, Guido van Rossum wrote:
> course, exists() and isdir() etc. do, and so does realpath(), but the
> pure parsing functions don't.

Yes, but:

H:\>echo foo > TeSt.txt
...>>> import os.path
 >>> os.path.realpath('test.txt')
'H:\\test.txt'
 >>> os.path.normcase('TeSt.txt')
'test.txt'

Both feel unsatisfying to me :-S

How can I get 'TeSt.txt' from 'test.txt' (which feels like the contract 
normcase *should* have...)

> They can be used without a working
> filesystem even. (E.g. you can import ntpath on a Unix box and happily
> parse Windows paths.)

But what value does that add over just doing a .lower() on the path?

Chris
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4