>> Why isn't this function in the os module with the other file commands?
>
> I don't know why they are broken up in this way. The glob module also 
> has some file access commands.

For the most part, the 'os' module follows the interface functions that C 
provides to access the operating system.  We can think of 'os' as the 
foundation for other high-level modules like 'shutil'.

But there's probably a bit of historical cruft involved here too. 
os.path.walk() and os.walk() duplicate each other's behavior, but neither 
can be removed without some effort.  Legacy is a hard nut to crack.  As 
another concrete example, we can look at 'fnmatch', whose functions should 
really live in the 'glob' module.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to