The script does this:
fh.seek(0x0006A);
fh.write('\xFF\xFF');
I don't know what is stored in that address, but in all my dumps with different lives and coins these values remain unchanged, so it's either the diamonds or the game is storing coins and diamonds in a very weird way. But I'm not fan of editing the savefile without knowing what it does. Also, the fact that I've found stocked lives stored somewhere that the script doesn't touch bothers me.
Well, I returned it to what it was before I used the script and I have once again 0 diamonds and around 3000 coins like I had. Hearts are what I had after using the script.
Then this:
fh.seek(0x000D1);
fh.write('\xFF\xFF\xFF\xFF\xFF\xFF\xFF');
In my savedumps these are always 00, so I guess they are the items you can buy (mega speed up, etc). I guess the editing would be ok just changing it to
fh.seek(0x000D1);
fh.write('\x63\x63\x63\x63\x63\x63\x63');
Now this definitely are the items, however they are saved... weirdly. This is how D1-D7 looks like in my unmodified save: 00 80 80 00 00 00 01
This translates to 1 Moves +5, 1 Exp points x1.5, 1 Mega Start, 2 Attack Power, and everything else is zero. Perhaps, since the maximum in the game is 99 it only uses 7 bits? But would it translate to 80 80 and 01?
Also, at others, the python script does work on Windows fine, but you must have Python 2.7 installed, it will NOT work on Python 3.4