Advertisement
Guest User

Untitled

a guest
Oct 30th, 2014
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. Python 2.7.3 (default, Apr 10 2012, 23:24:47) [MSC v.1500 64 bit (AMD64)] on win32
  2. Type "help", "copyright", "credits" or "license" for more information.
  3. >>>
  4.  
  5. import os, mmap
  6.  
  7. f = open('etc.test', 'r+b')
  8.  
  9. mapped = mmap.mmap(f.fileno(), 0, access=mmap.ACCESS_COPY)
  10. print mapped[0]
  11. mapped[0] = 'R'
  12. print mapped.flush() <--- returns 0 (error on Windows)
  13. mapped.close()
  14. f.close()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement