# WIll modifying an essential python file cause data loss in blend file?

I reinstalled Blender freshly from blender.org and I noticed that, after working on a file, the size of destination folder where Blender is installed has increased and I don't know if this usual. Because the size of this directory has changed, this brings me to the question: can I modify/remove/add some python files (which are essential) by accident by just working normally on a blend file?

In case of removing or modifying a python file, will Blender continue working (and there is chance of data loss in my blend.file) or will Blender give an error and quit immediately?

• As far as I'm concerned No Yes No and No ;) But you can't be 100% sure, always can happen "something", so make sure to save your work every now and then. – Vitaliy Jul 2 '15 at 16:19
• I did save the files, but I don't know if modifying an essential python file cause data loss in the to be opened blend file (like the data loss can have when you open a new version file in an older version of Blender) :) – Faceb Faceb Jul 2 '15 at 16:24
• You can't have a data loss until you save your file. Blender will give an error as soon as missing essential file is accessed. How it will behave greatly depends on what is missing. It can crash, or just give you an error, but I'm quite sure it can't just continue like nothing happened. – Vitaliy Jul 2 '15 at 16:33

Well… There are several questions here actually:

## I. Is it normal that the installation directory of Blender grows after the first launch?

YES: Blender is only distributed with “pure” python files, the first time those get used/executed, the python interpreter will sort of compile them into an intermediary “machine language” code (similar to assembler, but universal and that still has to be interpreted by the python engine, not directly by the processor). You can find all those .pyc files in special __pycache__ directories next to all py modules (UI scripts, addons,.etc.).

However, it is possible to modify a py script such that it breaks saving valid data (the simplest way to do so is to register a save_pre handler, and in that handler to e.g. delete all scenes or other nasty things like that. You can also generate invalid data (broken mesh, etc.) that will crash Blender on next load of the file, but that’s not so obvious to do. But yes, if you really want to, you do can break saving of .blend files from py script, like pretty much anything else in Blender.