Peter Hansen <[EMAIL PROTECTED]> writes: >> * staticmethod Path.getcwd() -> Path.cwd() >> * bytes() / lines() / text() -> read_file_{bytes,lines,text} methods >> * write_{bytes,lines,text} -> write_file_{bytes,lines,text} methods > Under Linux isn't it possible to open and read from directories much > as with files?
The OS doesn't matter - python won't let you open a directory as a file, even if the underlying OS will. The comment in Objects/fileobject.c is: /* On Unix, fopen will succeed for directories. In Python, there should be no file objects referring to directories, so we need a check. */ I think - but I'm not positive, and don't have a Linux box handy to check on - that this comment is false if your Unix is really Linux. <mike -- Mike Meyer <[EMAIL PROTECTED]> http://www.mired.org/home/mwm/ Independent WWW/Perforce/FreeBSD/Unix consultant, email for more information. -- http://mail.python.org/mailman/listinfo/python-list