コード例 #1
0
    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)
コード例 #2
0
    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)
コード例 #3
0
    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 )
コード例 #4
0
ファイル: querystring.py プロジェクト: li282886931/webscan
		def __str__(self):
			'''
			'''
			return enc_dec.urlencode(self, encoding=self.encoding)