 <p>you have to MIME-encode your post: a binary post in an NNTP newsgroup is like a mail with an attachment. </p> <p>the file has to be encoded in ASCII, generally using the <code>base64</code> encoding, then the encoded file is packaged iton a multipart MIME message and posted...</p> <p>have a look at the <a href="http://docs.python.org/library/email.html#module-email" rel="nofollow noreferrer"><code>email</code></a> module: it implements all that you want.</p> <p>i encourage you to read <a href="http://tools.ietf.org/html/rfc3977" rel="nofollow noreferrer"><code>RFC3977</code></a> which is the official standard defining the NNTP protocol.</p> <p><em>for the second part of your question:</em></p> <p>use <a href="http://docs.python.org/library/stringio.html#module-StringIO" rel="nofollow noreferrer"><code>StringIO</code></a> to build a fake file object from a string (the <code>post()</code> method of nntplib accepts open file objects). <code>email.Message</code> objects have a <code>as_string()</code> method to retrieve the content of the message as a plain string.</p>