[Tutor] listdir() (original) (raw)
Jeff Shannon jeff at ccvcorp.com
Fri Jul 2 21:24:30 EDT 2004
- Previous message: [Tutor] listdir()
- Next message: [Tutor] Where should I save my programs?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Ole Jensen wrote:
Jeff Shannon wrote:
Look into the os.isdir() function, which will tell you easily whether a given pathname is a directory or not. You will, however, need to do your own sorting if you want directories to appear before regular files. (Of course, you'd probably want to sort entries anyhow, since IIRC the ordering returned by os.listdir() is arbitrary.) I guess you mean os.path.isdir()... I'll have a look at it. Thanks.
Ah, yes, I was replying from memory, and the details sometimes slip...
IIRC - what's that?
IIRC == if I remember correctly
Jeff Shannon Technician/Programmer Credit International
- Previous message: [Tutor] listdir()
- Next message: [Tutor] Where should I save my programs?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]