wxPython/wxGlade-0.9.1/codegen/__init__.py
def _tagcontent(self, tag, content, newline=False):
        """Returns content embedded between C{begin wxGlade} and C{end wxGlade} sequence.

        @return: Embedded content string
        @param tag: used in C{begin wxGlade} statement to indicate different blocks
        @param content: Content to enter as string or list of strings
        @param newline: Add a tailing empty line?"""
        code_list = []
        if self._mark_blocks:
            code_list.append( '%s begin wxGlade: %s' % (self.comment_sign, tag) )
        if isinstance(content, list):
            for entry in content:
                code_list.append(entry.rstrip())
        elif isinstance(content, compat.basestring):
            # don't append empty content
            _content = content.rstrip()
            if _content:
                code_list.append(_content)
        else:
            raise AssertionError('Unknown content type: %s' % type(content))
        if self._mark_blocks:
            code_list.append( '%s end wxGlade' % self.comment_sign )
        # newline for "end wxGlade" line
        code_list.append('')
        if newline:
            code_list.append('')
        return "\n".join(code_list)
Returns content embedded between C{begin wxGlade} and C{end wxGlade} sequence.

        @return: Embedded content string
        @param tag: used in C{begin wxGlade} statement to indicate different blocks
        @param content: Content to enter as string or list of strings
        @param newline: Add a tailing empty line?
Returns content embedded between C{begin wxGlade} and C{end wxGlade} sequence.
Returns content embedded between C { begin wxGlade } and C { end wxGlade } sequence .
def _tagcontent(self, tag, content, newline=False):
        code_list = []
        if self._mark_blocks:
            code_list.append( '%s begin wxGlade: %s' % (self.comment_sign, tag) )
        if isinstance(content, list):
            for entry in content:
                code_list.append(entry.rstrip())
        elif isinstance(content, compat.basestring):
            _content = content.rstrip()
            if _content:
                code_list.append(_content)
        else:
            raise AssertionError('Unknown content type: %s' % type(content))
        if self._mark_blocks:
            code_list.append( '%s end wxGlade' % self.comment_sign )
        code_list.append('')
        if newline:
            code_list.append('')
        return "\n".join(code_list)
def _tagcontent ( self , tag , content , newline = False ) : code_list = [ ] if self . _mark_blocks : code_list . append ( '%s begin wxGlade: %s' % ( self . comment_sign , tag ) ) if isinstance ( content , list ) : for entry in content : code_list . append ( entry . rstrip ( ) ) elif isinstance ( content , compat . basestring ) : _content = content . rstrip ( ) if _content : code_list . append ( _content ) else : raise AssertionError ( 'Unknown content type: %s' % type ( content ) ) if self . _mark_blocks : code_list . append ( '%s end wxGlade' % self . comment_sign ) code_list . append ( '' ) if newline : code_list . append ( '' ) return "\n" . join ( code_list )
Returns content embedded between C{begin wxGlade} and C{end wxGlade} sequence.
Returns content embedded between C { begin wxGlade } and C { end wxGlade } sequence .
"""Returns content embedded between C{begin wxGlade} and C{end wxGlade} sequence.

        @return: Embedded content string
        @param tag: used in C{begin wxGlade} statement to indicate different blocks
        @param content: Content to enter as string or list of strings
        @param newline: Add a tailing empty line?""" # don't append empty content # newline for "end wxGlade" line
Embedded content string
Embedded content string
self
tag
used in C{begin wxGlade} statement to indicate different blocks
used in C { begin wxGlade } statement to indicate different blocks
content
Content to enter as string or list of strings
Content to enter as string or list of strings
newline
None