On Wed, Aug 31, 2011 at 8:38 AM, Steffen Frömer <steffen.froe...@gns-systems.de> wrote: > Hello, > > i try to check, if a file on network-share is read only. I tried different > ways.
Not the prettiest, but if you want to know if the SHARE is read only, you can do a functional test. import os, tempfile def check_write(filename): try: fd, fn = tempfile.mkstemp(dir=os.path.dirname(filename)) os.close(fd) os.remove(fn) except: return False else: return True Does Windows Explorer show files on the share as read only when you view their properties? It all depends on whether Samba advertises the share's read only state via file attributes, looks like it does not. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32