urllib.urlencode could encode url's params.  It seems no likely function in Mechanize.
So, I have to use urllib and Mechanize, because I only need urlencode.
Any function could implement the same task like urllib.urlencode in Mechanize
mechanize actually uses urllib and urllib2 for most tasks that involve urls. 
Since this functionality already exists in urllib/2 (as mentioned by Ignacio Vazquez-Abrams) there's no need for it to be implemented elsewhere. When coding you import all the libraries that have functionality you need to use.
which function of mechanize is equal with urllib.urlencode