def md5sum_str(user_str):
 if (not isinstance(user_str, basestring)):
  console.error_exit('Not a valid basestring type to calculate md5.')
 m = md5.md5()
 m.update(user_str)
 return m.hexdigest()

def md5sum_str ( user_str ) : if ( not isinstance ( user_str , basestring ) ) : console . error_exit ( 'Not a valid basestring type to calculate md5.' ) m = md5 . md5 ( ) m . update ( user_str ) return m . hexdigest ( )
md5sum of basestring .