def __str__(self): """ This method returns a string representation of the form Object. >>> f = form() >>> _ = f.addInput( [("type", "text") , ("name", "abc") , ("value", "123")] ) >>> str(f) 'abc=123' >>> f = form() >>> _ = f.addInput( [("type", "text") , ("name", "abc") , ("value", "123")] ) >>> _ = f.addInput( [("type", "text") , ("name", "def") , ("value", "000")] ) >>> str(f) 'abc=123&def=000' @return: string representation of the form Object. """ tmp = self.copy() for i in self._submitMap: tmp[i] = self._submitMap[i] # # FIXME: hmmm I think that we are missing something here... what about # self._select values. See FIXME below. Maybe we need another for? # return urlencode(tmp)
def __str__(self): ''' This method returns a string representation of the form Object. >>> f = form() >>> _ = f.addInput( [("type", "text") , ("name", "abc") , ("value", "123")] ) >>> str(f) 'abc=123' >>> f = form() >>> _ = f.addInput( [("type", "text") , ("name", "abc") , ("value", "123")] ) >>> _ = f.addInput( [("type", "text") , ("name", "def") , ("value", "000")] ) >>> str(f) 'abc=123&def=000' @return: string representation of the form Object. ''' tmp = self.copy() for i in self._submitMap: tmp[i] = self._submitMap[i] # # FIXME: hmmm I think that we are missing something here... what about # self._select values. See FIXME below. Maybe we need another for? # return urlencode(tmp)
def __str__( self ): ''' This method returns a string representation of the dataContainer Object. >>> dc = dataContainer( [('a','1') , ('b', ['2','3']) ] ) >>> str(dc) 'a=1&b=2&b=3' >>> dc = dataContainer( [('a','1') , ('b', '2') ] ) >>> str(dc) 'a=1&b=2' @return: string representation of the dataContainer Object. ''' return urlencode( self )
def __str__(self): ''' ''' return enc_dec.urlencode(self, encoding=self.encoding)