Skip to content

Instantly share code, notes, and snippets.

@Elizaveta239
Created February 5, 2016 10:57
Show Gist options
  • Save Elizaveta239/a47ffa7be415d439c04f to your computer and use it in GitHub Desktop.
Save Elizaveta239/a47ffa7be415d439c04f to your computer and use it in GitHub Desktop.
from _pydev_bundle._pydev_filesystem_encoding import getfilesystemencoding
def norm_case(filename):
filename = os_normcase(filename)
enc = getfilesystemencoding()
if IS_PY3K or enc == 'UTF-8':
return filename
res = filename.decode(enc).lower().encode(enc)
print(filename, res, enc)
return res
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment