Hey all,
This is driving me crazy…
I’ve narrowed down my application to the following example code. If I comment out the _file.write() line NOTHING gets written to the flash. The data.dat file doesn’t get created (Which is fine cuz i’m not writing anything to it) and the config.dat also DOESN’T get written (PROBLEM).
If I uncomment the _file.write() line then everything gets written to flash, both data.dat and config.dat.
Does any one else experience this issue, or is it my module or is it a python bug ?
import marshal
_file = open("data.dat", "a+b");
val = {'PIN': '0000', 'MaxTime': 120};
# If this is here it works.... ?
#_file.write("WTF!!");
_file.close();
_fcfg = open("config.dat", "w+b")
marshal.dump(val, _fcfg);
_fcfg.close();
I’ve also tried changing mode types from a+b to ab to a and w+b to wb to w. None of this solves the problem.
Any help would be greatly appreciated.
Thanks!