Process a GROUP command. Argument: - group: the group name Returns: - resp: server response if successful - count: number of articles - first: first article number - last: last article number - name: the group name
(self, name)
| 681 | return self._getdescriptions(group_pattern, True) |
| 682 | |
| 683 | def group(self, name): |
| 684 | """Process a GROUP command. Argument: |
| 685 | - group: the group name |
| 686 | Returns: |
| 687 | - resp: server response if successful |
| 688 | - count: number of articles |
| 689 | - first: first article number |
| 690 | - last: last article number |
| 691 | - name: the group name |
| 692 | """ |
| 693 | resp = self._shortcmd('GROUP ' + name) |
| 694 | if not resp.startswith('211'): |
| 695 | raise NNTPReplyError(resp) |
| 696 | words = resp.split() |
| 697 | count = first = last = 0 |
| 698 | n = len(words) |
| 699 | if n > 1: |
| 700 | count = words[1] |
| 701 | if n > 2: |
| 702 | first = words[2] |
| 703 | if n > 3: |
| 704 | last = words[3] |
| 705 | if n > 4: |
| 706 | name = words[4].lower() |
| 707 | return resp, int(count), int(first), int(last), name |
| 708 | |
| 709 | def help(self, *, file=None): |
| 710 | """Process a HELP command. Argument: |