Server IP : 149.255.58.128 / Your IP : 216.73.216.126
System : Linux cloud516.thundercloud.uk 5.14.0-427.26.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jul 17 15:51:13 EDT 2024 x86_64
PHP Version : 8.2.28
Disable Function : allow_url_include, apache_child_terminate, apache_setenv, exec, passthru, pcntl_exec, posix_kill, posix_mkfifo, posix_getpwuid, posix_setpgid, posix_setsid, posix_setuid, posix_setgid, posix_seteuid, posix_setegid, posix_uname, proc_close, proc_get_status, proc_open, proc_terminate, shell_exec, show_source, system
cURL : ON | WGET : ON | Sudo : OFF | Pkexec : OFF
Upload Files :
Command :
Current File : /lib64/python3.9/__pycache__//nntplib.cpython-39.opt-1.pyc
a
�DOg?� � @ 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>