nntp/nntp.py
def list_active_gen(self, pattern=None):
        """Generator for the LIST ACTIVE command.

        Generates a list of active newsgroups that match the specified pattern.
        If no pattern is specfied then all active groups are generated.

        See <http://tools.ietf.org/html/rfc3977#section-7.6.3>

        Args:
            pattern: Glob matching newsgroups of intrest.

        Yields:
            A tuple containing the name, low water mark, high water mark,
            and status for the newsgroup.
        """
        args = pattern

        if args is None:
            cmd = "LIST"
        else:
            cmd = "LIST ACTIVE"

        code, message = self.command(cmd, args)
        if code != 215:
            raise NNTPReplyError(code, message)

        for line in self.info_gen(code, message):
            yield utils.parse_newsgroup(line)
def list_active_gen(self, pattern=None):
        args = pattern

        if args is None:
            cmd = "LIST"
        else:
            cmd = "LIST ACTIVE"

        code, message = self.command(cmd, args)
        if code != 215:
            raise NNTPReplyError(code, message)

        for line in self.info_gen(code, message):
            yield utils.parse_newsgroup(line)
def list_active_gen ( self , pattern = None ) : args = pattern if args is None : cmd = "LIST" else : cmd = "LIST ACTIVE" code , message = self . command ( cmd , args ) if code != 215 : raise NNTPReplyError ( code , message ) for line in self . info_gen ( code , message ) : yield utils . parse_newsgroup ( line )
Generator for the LIST ACTIVE command.

        Generates a list of active newsgroups that match the specified pattern.
        If no pattern is specfied then all active groups are generated.

        See <http://tools.ietf.org/html/rfc3977#section-7.6.3>

        Args:
            pattern: Glob matching newsgroups of intrest.

        Yields:
            A tuple containing the name, low water mark, high water mark,
            and status for the newsgroup.
Generator for the LIST ACTIVE command .