Jon Bendtsen wrote: > Jon Bendtsen wrote: >> Dennis Lee Bieber wrote: >>> On Wed, 27 May 2009 14:25:58 +0200, Jon Bendtsen <no...@example.com> >>> declaimed the following in gmane.comp.python.general: >>> >>>> 'From: r...@laerdal.dk\nsubject: testing\nNewsgroups: test\nBody: >>>> \n\n\nfoobar\n\n\n.\n\n\n' >>>> >>> I believe NNTP, like SMTP, requires \r\n line termination. >> I will try it, but why does it then work when it posts the file? The >> file is a std. unix file, so it should also only have \n line >> termination. > > I have now tried adding \r infront of all \n. That didnt help. > > I tried making a tempfile.TemporaryFile(dir='/tmp') which did not > work either. Message is still: > > nntplib.NNTPTemporaryError: 441 Article has no body -- just headers
with the help of #python on Freenode i found the problem. I didnt seek back to 0. With seeking stringio works, and then i will use that. -- http://mail.python.org/mailman/listinfo/python-list