File Permissions

Sybren Stuvel sybrenUSE at YOURthirdtower.com.imagination
Fri Mar 10 15:26:45 CET 2006


VJ enlightened us with:
> Basically i want to write into a file .If the permissions are not
> there then print a error message.  How do i achive this ???

f = file('somefile', 'w')

then catch the exception that's thrown when it can't be done.

Sybren
-- 
The problem with the world is stupidity. Not saying there should be a
capital punishment for stupidity, but why don't we just take the
safety labels off of everything and let the problem solve itself? 
                                             Frank Zappa



More information about the Python-list mailing list