MINI MINI MANI MO
3
  \F                 @   s  d Z ddlZddlZddlZddlZddlZyddlZW n ek
rP   dZY nX dZddl	m
Z ddlmZ ddd	d
ddd
dgZ
dZG dd deZG dd	 d	eZG dd
 d
eZG dd deZG dd deZG dd
 d
eZdZdZddddddddd d!d"d#hZd$d%d&d'd(d)d*gZd)d*d+Zd,Zejd-d.d/d0d1gZejd2d3d4d5gZd6d Z
d7d8 Zdld9d:Z dmd;d<Z!dnd=d>Z"erd?d@ Z#G dAdB dBZ$G dCd de$Z%erG dDdE dEe$Z&e
j'dE e(dFkrddl)Z)e)j*dGdHZ+e+j,dIdJdKdLdM e+j,dNdOdPdQdM e+j,dRdSdoe-dUeef dV e+j,dWdXdYe-dZdV e+j,d[d\d]dd^d_ e+j. Z/e/j0Z0e/jse0dpkrteZ0e%e/j1e0d`Z2ne0dqkreZ0e&e/j1e0d`Z2e2j3 Z4dae4kre2j5  e2j6e/j6\Z7Z8Z9Z:Z;e<dbe;dce8dde9dee: dfdg Z=e>e-e:e/j? dT Z9e2j@e9e:\Z7ZAxbeAD ]Z\ZBZCe
eCd% jDdhdTd ZEe
eCd$ ZFe-eCd* ZGe<dijHeBe=eEdje=eFdkeG qW e2jI  dS )ra  An NNTP client class based on:
- RFC 977: Network News Transfer Protocol
- RFC 2980: Common NNTP Extensions
- RFC 3977: Network News Transfer Protocol (version 2)
Example:
>>> from nntplib import NNTP
>>> s = NNTP('news')
>>> resp, count, first, last, name = s.group('comp.lang.python')
>>> print('Group', name, 'has', count, 'articles, range', first, 'to', last)
Group comp.lang.python has 51 articles, range 5770 to 5821
>>> resp, subs = s.xhdr('subject', '{0}-{1}'.format(first, last))
>>> resp = s.quit()
>>>
Here 'resp' is the server response line.
Error responses are turned into exceptions.
To post an article from a file:
>>> f = open(filename, 'rb') # file containing article, including header
>>> resp = s.post(f)
>>>
For descriptions of all methods, read the comments in the code below.
Note that all arguments and return values representing article numbers
are strings, not numbers, since they are rarely used for calculations.
    NFT)
decode_header)_GLOBAL_DEFAULT_TIMEOUTNNTP	NNTPErrorNNTPReplyErrorNNTPTemporaryErrorNNTPPermanentErrorNNTPProtocolError
NNTPDataErrorr   i   c               @   s   e Zd ZdZdd ZdS )r   z%Base class for all nntplib exceptionsc             G   s>