Python MIME Base64 Encoding
<p>I need to generate a MIME attachment that contains a Base64 encoded file. However what I need to also allow for is encoding the attachment <strong><em>WITHOUT</em></strong> any new lines. The code I have is as followed:</p>

<pre><code>msg_obj = MIMEMultipart()
msg_atch = MIMEBase(mime_type, mime_subtype)
msg_atch.set_payload(file_data)
Encoders.encode_base64(msg_atch)
msg_obj.attach(msg_atch)
</code></pre>

<p>What I have tried to perform to remove the new lines in the attach base64 message was this:</p>

<pre><code>msg_obj = MIMEMultipart()
msg_atch = MIMEBase(mime_type, mime_subtype)
msg_atch.set_payload(file_data)
Encoders.encode_base64(msg_atch)
msg_atch.strip()
msg_obj.attach(msg_atch)
</code></pre>

<p>However this failed to change the results of the data. If anyone has any ideas on how to allow for this, it would be great.</p>
