读
with open( '/path/to/file', 'r' ) as f: print( f.read() )
写
with open('/Users/michael/test.txt', 'w') as f: f.write('Hello, world!')