ok i also need to check the existance of a file, but i can’t expect everyone who wants to play the game to have python installed and all the path stuff set up, else no one will bother.
therefore two methods seem possible wiht pure blender…
- if open(file, “r”):
this will return true if it can read a file. This therefore checks the existance of a file…However, if the file doesn’t exist, then it returns an error…
is there anyway to say, If an error happens… return false???
blah if only os was a pure blender python module
- would there be a way to create or just append to it, and then check if the file has an attribute it wasn’t set on creation but after this check. Therefore it will have a property if it existed before being created/appended?
I am not good at python, only good enough to unerstand my problem.
i have to check if a file exists…