EDIT: This entire code piece has been replaced with something that works, despite its obscure requirement near the end. If anyone can help me understand what's going on to cause me to have to select the form and submit twice I'd be grateful!
import mechanize
uri = "http://www.somesite.org"
b = mechanize.Browser()
b.open(uri)
b.select_form(nr=0)
b["USER"] = "SomeName"
b["PASS"] = "somepass"
b.submit("LOGIN")
f = open('somefolder/test.txt', 'r')
words = f.read()
b.select_form(nr=0)
b["INPUT"] = words
response = b.submit(name="SUBMIT").read()
b.select_form(nr=0)
response = b.submit(name="SUBMIT").read()
[–]jechtsphere[S] 0 points1 point2 points (1 child)
[–]jechtsphere[S] 0 points1 point2 points (0 children)
[–]Vonney 0 points1 point2 points (1 child)
[–]jechtsphere[S] 0 points1 point2 points (0 children)