Possible Duplicate:
What is the best way to open a file for exclusive access in Python?
I am creating a paint program. And when the user loads an image, I want that file to be 'protected', so the user can't delete it, rename, ect.. and the message comes up 'file is currently being used by another process'.
Is there a way to do this in python?
Edit:
I would like it to work on Linux, Mac and windows