Just got done writing this nice little posting script. Its my first python script ecer so be nice lol.
#!/usr/bin/python3 import nntplib import sys NAME = 'testbunny' EMAIL = 'te...@test.com' SIG = 'Testbunny' ORG = 'Python Pirates' SERVER = 'nntp.aioe.org' GROUPS = 'alt.test' SUBJECT = input("What is the subject? ") print("Enter/Paste your content. Ctrl-D or Ctrl-Z ( windows ) to save it.") contents = [] while True: try: BODY = input() contents.append(BODY) except EOFError: break text = '\n'.join(contents) open('article.txt', 'w').close() with open('article.txt', 'a') as f: f.write('From: ' + NAME + " <" + EMAIL + ">") f.write("\n") f.write('Subject: ' + SUBJECT) f.write("\n") f.write('Newsgroups: ' + GROUPS) f.write("\n") f.write('Organization: ' + ORG) f.write("\n") f.write('User-Agent: Python3') f.write("\n") f.write("\n") f.writelines(text) f.write("\n") f.write("\n") f.write('--') f.write("\n") f.write(SIG) f.write("\n") f.write('.') print("Sending article....") s = nntplib.NNTP(SERVER) f = open('article.txt', 'rb') s.post(f) print("done") s.quit() -- Python Test Script . -- https://mail.python.org/mailman/listinfo/python-list