created readwrite.py
 the full source code without modification from my side