def slashdot(self, loginName, passwd):
    self.b.go(self.url)
f = self.b.get_form('1')
regexp = re.compile('Log In')
link = self.b.find_link(regexp)
if link:
    self.b.follow_link(link)
f = self.b.get_form('2')
f['unickname'] = loginName
f['upasswd'] = passwd
self.a.fv('2', 'userlogin', '')
t = browser()
t.slashdot('username', 'password')
How to log in to a website using installed twill?