def write(self, location, text, encoding):
        """
        Write file to disk.
        """
        location = os.path.expanduser(location)

        with gzip.open(location, 'wb') as f:
            f.write(text.encode(encoding))
def write ( self , location , text , encoding ) : location = os . path . expanduser ( location ) with gzip . open ( location , 'wb' ) as f : f . write ( text . encode ( encoding ) )
Write file to disk.