[issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames

2019-05-06 Thread CJ Kucera
CJ Kucera added the comment: Will do, thanks for the input! -- ___ Python tracker <https://bugs.python.org/issue36771> ___ ___ Python-bugs-list mailin

[issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames

2019-05-01 Thread CJ Kucera
CJ Kucera added the comment: Yeah, I'd wondered that too (re: a separate function) but it seemed like an awful lot of duplicated code. The PR I'd put through just changes the datatypes within the `filenames` and `dirnames` lists... I'd been thinking that'd be sufficient since you wouldn't

[issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames

2019-05-01 Thread CJ Kucera
CJ Kucera added the comment: I've started up a Github PR for this, btw, though IMO it's not really in a mergeable state yet: 1) I wasn't sure what to do about os.fwalk(), since that *doesn't* already generate DirEntry objects, and this change would introduce a small inconsistency between

[issue36771] Feature Request: An option to os.walk() to return os.DirEntry lists instead of just filenames/dirnames

2019-05-01 Thread CJ Kucera
New submission from CJ Kucera : It'd be nice to have an option to os.walk which would return DirEntry objects in its return tuple, as opposed to just the string filenames/dirnames. (Or failing that, an alternate function which does so.) The function already uses os.scandir() internally, so

[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2017-02-12 Thread CJ Kucera
CJ Kucera added the comment: Ah, well, actually I suppose I'll rescind that a bit - other pages about this bug around the internet had been claiming that the 'requests' module uses urllib in the backend and was subject to this bug as well, but after experimenting myself, it seems like

[issue14044] IncompleteRead error with urllib2 or urllib.request -- fine with urllib, wget, or curl

2017-02-12 Thread CJ Kucera
CJ Kucera added the comment: I've just encountered this problem on Python 3.6, on a different URL. The difference being that it's not encountered with EVERY page load, though I'd say it happens with at least half: import urllib.request html = urllib.request.urlopen('http