[Robin Siebler wrote] > How would I get/change the read-only attribute on a file? The only way that > I have found is win32file.GetFileAttributes. I have tried this, but I don't > what to do with the number it returns.
You could read section 6.1.4 of the Python Library Reference (Files and Directories stuff in the 'os' module). Look at access() and chmod(). Or, if you want to, you can use the win32file methods: GetFileAttributes() and SetFileAttributes(). You probably only need to do this if you need more information than whether the file is read-only. As the PyWIn32 docs say, the return value of GetFileAttributes is a logical-or of win32con.FILE_ATTRIBUTE_* constants. And as per usual, the best source of documentation on the PyWin32 stuff is MSDN. CHeck out: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wceobjst/htm/cerefGetFileAttributes.asp Cheers, Trent -- Trent Mick [EMAIL PROTECTED] _______________________________________________ ActivePython mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs Other options: http://listserv.ActiveState.com/mailman/listinfo/ActivePython