Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class FileUpperSimple(object):
- def __init__(self,fname):
- self.fname=fname
- self.__f=None
- def read (self):
- return self.__f.read().upper()
- def __enter__(self):
- self.__f=open)self.fname)
- return self
- def __exit__ (self,exc_type,exc_val, exc_tb):
- self.__f.close()
- return False
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement