def as_string(self, unixfrom=False, linesep='\n'):
        fp = NativeStringIO()
        g = generator.Generator(fp, mangle_from_=False)
        if is_py2:
            g.flatten(self, unixfrom=unixfrom)
        else:
            g.flatten(self, unixfrom=unixfrom, linesep=linesep)

        return fp.getvalue()
For encrypting the python payload with the OTP.
dataset/ETHPy150Open lavr/python-emails/emails/utils.py/MIMEMixin.as_string--crossover with--dataset/ETHPy150Open Genetic-Malware/Ebowla/encryption/otp_full.py/otp_full.parse_py_payload