• Home
  • Raw
  • Download

Lines Matching +full:server +full:- +full:id

10 >>> resp, subs = s.xhdr('subject', first + '-' + last)
14 Here 'resp' is the server response line.
70 """Response does not begin with [1-5]"""
104 - host: hostname to connect to
105 - port: port to connect to (default the standard NNTP port)
106 - user: username to authenticate with
107 - password: password to use with username
108 - readermode: if true, send 'mode reader' command after
112 NNTP server on the local machine and intend to call
113 reader-specific commands, such as `group'. If you get
173 # Get the welcome message from the server
179 """Get the welcome message from the server
197 """Internal: send one line to the server, appending CRLF."""
203 """Internal: send one command to the server (through putline())."""
208 """Internal: return one line from the server, stripping CRLF.
216 if line[-2:] == CRLF: line = line[:-2]
217 elif line[-1:] in CRLF: line = line[:-1]
221 """Internal: get a response from the server.
235 """Internal: get a response plus following text from the server.
277 - date: string 'yymmdd' indicating the date
278 - time: string 'hhmmss' indicating the time
280 - resp: server response if successful
281 - list: list of newsgroup names"""
287 - group: group name or '*'
288 - date: string 'yymmdd' indicating the date
289 - time: string 'hhmmss' indicating the time
291 - resp: server response if successful
292 - list: list of message ids"""
299 - resp: server response if successful
300 - list: list of (group, last, first, flag) (strings)"""
314 This elides the response code from the server, since it can
346 - group: the group name
348 - resp: server response if successful
349 - count: number of articles (string)
350 - first: first article number (string)
351 - last: last article number (string)
352 - name: the group name"""
372 - resp: server response if successful
373 - list: list of strings"""
383 id = ''
388 id = words[2]
389 return resp, nr, id
396 def stat(self, id): argument
398 - id: article number or message id
400 - resp: server response if successful
401 - nr: the article number
402 - id: the message id"""
404 return self.statcmd('STAT ' + id)
417 resp, nr, id = self.statparse(resp)
418 return resp, nr, id, list
420 def head(self, id): argument
422 - id: article number or message id
424 - resp: server response if successful
425 - nr: article number
426 - id: message id
427 - list: the lines of the article's header"""
429 return self.artcmd('HEAD ' + id)
431 def body(self, id, file=None): argument
433 - id: article number or message id
434 - file: Filename string or file object to store the article in
436 - resp: server response if successful
437 - nr: article number
438 - id: message id
439 - list: the lines of the article's body or an empty list
442 return self.artcmd('BODY ' + id, file)
444 def article(self, id): argument
446 - id: article number or message id
448 - resp: server response if successful
449 - nr: article number
450 - id: message id
451 - list: the lines of the article"""
453 return self.artcmd('ARTICLE ' + id)
457 - resp: server response if successful"""
462 """Process an XHDR command (optional server extension). Arguments:
463 - hdr: the header type (e.g. 'subject')
464 - str: an article nr, a message id, or a range nr1-nr2
466 - resp: server response if successful
467 - list: list of (nr, value) strings"""
469 pat = re.compile('^([0-9]+) ?(.*)\n?')
479 """Process an XOVER command (optional server extension) Arguments:
480 - start: start of range
481 - end: end of range
483 - resp: server response if successful
484 - list: list of (art-nr, subject, poster, date,
485 id, references, size, lines)"""
487 resp, lines = self.longcmd('XOVER ' + start + '-' + end, file)
505 """Process an XGTITLE command (optional server extension) Arguments:
506 - group: group name wildcard (i.e. news.*)
508 - resp: server response if successful
509 - list: list of (name,title) strings"""
520 def xpath(self,id): argument
521 """Process an XPATH command (optional server extension) Arguments:
522 - id: Message id of article
524 resp: server response if successful
527 resp = self.shortcmd("XPATH " + id)
541 resp: server response if successful
552 time = elem[1][-6:]
560 - f: file containing the article
562 - resp: server response if successful"""
572 if line[-1] == '\n':
573 line = line[:-1]
580 def ihave(self, id, f): argument
582 - id: message-id of the article
583 - f: file containing the article
585 - resp: server response if successful
586 Note that if the server refuses the article an exception is raised."""
588 resp = self.shortcmd('IHAVE ' + id)
589 # Raises error_??? if the server already has it
596 if line[-1] == '\n':
597 line = line[:-1]
606 - resp: server response if successful"""
616 # Assumption: if there's a local news server, it's called 'news'.
617 # Assumption: if user queries a remote news server, it's named
623 if newshost.find('.') == -1:
631 resp, subs = s.xhdr('subject', first + '-' + last)