SHARE
TWEET

Untitled

a guest Sep 23rd, 2019 83 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. from os import remove as delete
  2.  
  3. class Pagefile:
  4.   def __init__(self, loc=".", byte=False):
  5.     self.loc = loc
  6.     self.byte = byte
  7.     self.page_file = open(f"{loc}/pagefile", "w{'b' if byte else ''}+")
  8.     self.page = 1
  9.  
  10.   def __enter__(self):
  11.         return self
  12.   def __exit__(self, type, value, traceback):
  13.         self.page_file.close
  14.   def __del__(self):
  15.     delete(self.page_file)
  16.   def __iter__(self):
  17.     return self
  18.   def __next__(self):
  19.     pass
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top