bibi midi <bibsmen...@gmail.com> dixit:

> Like i thought so, there is no exception to catch if a file already exist.
> I've been browsing the many types of exceptions and cant find anything thats
> close. Thank you for clarifying.
> 

Actually, you can. I guess it's not the book author's intent, but you can try 
it for the sake of experiment. 

If you're working under a unix-like system, just try to write into another 
user's home dir (*), or any file outside your own home. The filesystem will 
refuse the permission, so you will get an error from python. In fact, in this 
case, you'll get an error both for creation and change.
I don't know the equivalent under other OSes, but it sure exists.

Denis
________________________________

la vita e estrany

http://spir.wikidot.com/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to