When reading a data file in Python, it would be really handy (for portability) to just use a local address (as opposed to the full path from C:) to locate the data file i.e. have the data file in the same folder as the scene file and just reference it by filename.
I’ve experimented with this, and the weird thing is, local address works - but only intermittently. I can make a test scene with a locally addressed data file that works OK. Restart C4D and open scene, and I get ‘no such file or directory’. I’m sure I’m missing something obvious.
f = open('testfile.txt', 'r') info = f.read() f.close() print info