bytes vs. characters
bytes vs. characters
Posted Apr 24, 2015 11:44 UTC (Fri) by cesarb (subscriber, #6266)In reply to: bytes vs. characters by lopgok
Parent article: Report from the Python Language Summit
I just took a quick look at the current Python source code for os.listdir (https://hg.python.org/cpython/file/151cab576cab/Modules/p...), and it only has code to skip the "." and ".." entries, as it's documented to do. In both the "str" and the "bytes" case, it adds every entry other than these two. For it to skip anything else on os.listdir, readdir() from glibc has to be skipping it, and it should affect more than just Python.
Or is the problem with something other than os.listdir?
Posted Apr 24, 2015 14:18 UTC (Fri)
by lopgok (guest, #43164)
[Link] (1 responses)
I do find it odd that the OS can list the file and I can manipulate the file name on the command line, but because it has some odd characters in it, python silently skips over it.
Posted May 9, 2015 21:34 UTC (Sat)
by nix (subscriber, #2304)
[Link]
bytes vs. characters
bytes vs. characters