How to get a directory file descriptor?

r0g aioe.org at technicalbloke.com
Tue Nov 25 02:41:33 EST 2008


Cong Ma wrote:
> Dear all,
> 
> Can you give me some hint on getting a directory file descriptor in Python?
> Besides, what's good about os.fchdir() if I can't get a directory fd in the
> first place?
> 
> Thanks for your reply.
> 
> Regards,
> Cong.
> 

for each in os.listdir(os.getcwd()):
  print each

Roger.



More information about the Python-list mailing list