human
how to set cookie in python mechanize
assistant
Here is some code to add header `('Cookie', 'cookiename=cookie value')` to mechanize browser `br`

br.addheaders = [('Cookie', 'cookiename=cookie value')]

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.