| Server IP : 185.125.27.153 / Your IP : 216.73.216.193 Web Server : Apache System : Linux d6e05399ed1f11695f7c56648ed78c66 6.1.0-0.deb11.50-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1~deb11u1 (2026-07-02) x86_64 User : uid174255 ( 174255) PHP Version : 8.3.31 Disable Function : exec,passthru,pcntl_exec,popen,proc_open,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /proc/8/root/usr/lib/python3.9/__pycache__/ |
Upload File : |
a
�:j?� � @ s> d Z ddlZddlZddlZddlZddlZzddlZW n eyN dZY n0 dZddl m
Z ddlmZ g d�Z
dZG d d
� d
e�ZG dd� de�ZG d
d� de�ZG dd� de�ZG dd� de�ZG dd� de�ZdZdZh d�Zg d�Zddd�ZdZe�dg d��Ze�dg d ��Zd!d"� Z
d#d$� ZdZd%d&�Z d[d'd(�Z!d\d)d*�Z"e�rZd+d,� Z#G d-d.� d.�Z$e�r�G d/d0� d0e$�Z%e
�&d0� e'd1k�r:ddl(Z(e(j)d2d3�Z*e*j+d4d5d6d7d8� e*j+d9d:d;d<d8� e*j+d=d>d?e,d@eef dA� e*j+dBdCdDe,dEdA� e*j+dFdGdHddIdJ� e*�-� Z.e.j/Z/e.j�sBe/d?k�r2eZ/e$e.j0e/dK�Z1ne/d?k�rPeZ/e%e.j0e/dK�Z1e1�2� Z3dLe3v �rxe1�4� e1�5e.j5�\Z6Z7Z8Z9Z:e;dMe:dNe7dOe8dPe9� dQdR� Z<e=e,e9�e.j> dS �Z8e1�?e8e9�\Z6Z@e@D ]Z\ZAZBe
eBdT ��CdUdS�d ZDe
eBdV �ZEe,eBd �ZFe;dW�GeAe<eDdX�e<eEdY�eF�� �q�e1�H� dS )]a� 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_TIMEOUT)�NNTP� NNTPError�NNTPReplyError�NNTPTemporaryError�NNTPPermanentError�NNTPProtocolError�
NNTPDataErrorr i c @ s e Zd ZdZdd� ZdS )r z%Base class for all nntplib exceptionsc G s>