Message254592
There is nothing special with glob(). By default the ls command outputs sorted list of files, but os.listdir() doesn't. Python is just lower-level language than Posix shell. You always can call sort() on result.
It is easy to just add sort() after calling os.listdir() in current glob() implementation. It shouldn't significantly affect performance. I would support this feature. But I'm planning to implement glob() with os.scandir(), and it is not so easy to support sorting in that implementation. |
|
Date |
User |
Action |
Args |
2015-11-13 09:30:47 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, eric.smith, drj, r.david.murray, Jim.Jewett, Dave Jones |
2015-11-13 09:30:46 | serhiy.storchaka | set | messageid: <1447407046.89.0.372691027535.issue21748@psf.upfronthosting.co.za> |
2015-11-13 09:30:46 | serhiy.storchaka | link | issue21748 messages |
2015-11-13 09:30:46 | serhiy.storchaka | create | |
|