import locale
import calendar
from re import compile as re_compile
-from re import IGNORECASE, ASCII
+from re import IGNORECASE
from re import escape as re_escape
from datetime import (date as datetime_date,
timedelta as datetime_timedelta,
method) up to the terminator, and then control will be returned to
you - by calling your self.found_terminator() method.
"""
-import socket
import asyncore
from collections import deque
"""
import os
import sys
-import errno
import importlib.util
import py_compile
import struct
elif os.name == "posix":
# Andreas Degert's find functions, using gcc, /sbin/ldconfig, objdump
- import re, tempfile, errno
+ import re, tempfile
def _findLib_gcc(name):
expr = r'[^\(\)\s]*lib%s\.[^\(\)\s]*' % re.escape(name)
# See http://speleotrove.com/decimal/
__libmpdec_version__ = "2.4.0" # compatible libmpdec version
-import copy as _copy
import math as _math
import numbers as _numbers
import sys
'Differ','IS_CHARACTER_JUNK', 'IS_LINE_JUNK', 'context_diff',
'unified_diff', 'HtmlDiff', 'Match']
-import warnings
import heapq
from collections import namedtuple as _namedtuple
import re
import urllib # For urllib.parse.unquote
from string import hexdigits
-from collections import namedtuple, OrderedDict
+from collections import OrderedDict
from email import _encoded_words as _ew
from email import errors
from email import utils
import sys
import time
import random
-import warnings
from copy import deepcopy
from io import StringIO, BytesIO
-from email._policybase import compat32
-from email.header import Header
from email.utils import _has_surrogates
-import email.charset as _charset
UNDERSCORE = '_'
NL = '\n' # XXX: no longer used by the code below.
words.append((encoded, encoding, charset))
# Now loop over words and remove words that consist of whitespace
# between two encoded strings.
- import sys
droplist = []
for n, w in enumerate(words):
if n>1 and w[1] and words[n-2][1] and words[n-1][0].isspace():
for string, charset in self._chunks:
if hasspace is not None:
hasspace = string and self._nonctext(string[0])
- import sys
if lastcs not in (None, 'us-ascii'):
if not hasspace or charset not in (None, 'us-ascii'):
formatter.add_transition()
__all__ = ['MIMEText']
-from email.encoders import encode_7or8bit
from email.mime.nonmultipart import MIMENonMultipart
__all__ = ['Parser', 'HeaderParser', 'BytesParser', 'BytesHeaderParser',
'FeedParser', 'BytesFeedParser']
-import warnings
from io import StringIO, TextIOWrapper
from email.feedparser import FeedParser, BytesFeedParser
-from email.message import Message
from email._policybase import compat32
]
import re
-import io
from string import ascii_letters, digits, hexdigits
import os
import re
import time
-import base64
import random
import socket
import datetime
import urllib.parse
-import warnings
-from io import StringIO
from email._parseaddr import quote
from email._parseaddr import AddressList as _AddressList
pass
from abc import get_cache_token
from collections import namedtuple
-from types import MappingProxyType, MethodType
+from types import MappingProxyType
from weakref import WeakKeyDictionary
try:
from _thread import RLock
import socket
import collections
from urllib.parse import urlsplit
-import warnings
__all__ = ["HTTPResponse", "HTTPConnection",
"HTTPException", "NotConnected", "UnknownProtocol",
__all__ = ["HTTPServer", "BaseHTTPRequestHandler"]
import html
-import email.message
-import email.parser
import http.client
import io
import mimetypes
To use, simply 'import logging' and log away!
"""
-import sys, logging, logging.handlers, socket, struct, traceback, re
+import sys, logging, logging.handlers, struct, traceback, re
import io
try:
To use, simply 'import logging.handlers' and log away!
"""
-import errno, logging, socket, os, pickle, struct, time, re
-from codecs import BOM_UTF8
+import logging, socket, os, pickle, struct, time, re
from stat import ST_DEV, ST_INO, ST_MTIME
import queue
try:
# or returning from a flush() method. See functions _sync_flush() and
# _sync_close().
-import sys
import os
import time
import calendar
import sys
import socket
import struct
-import errno
import time
import tempfile
import itertools
#
import bisect
-import itertools
import mmap
import os
import sys
import tempfile
import threading
-import _multiprocessing
from . import context
from . import reduction
# If threading is available then ThreadPool should be provided. Therefore
# we avoid top-level imports which are liable to fail on some systems.
from . import util
-from . import get_context, cpu_count, TimeoutError
+from . import get_context, TimeoutError
#
# Constants representing the state of a pool
-import fcntl
import io
import os
from . import spawn
from . import util
-from . import current_process
-
__all__ = ['Popen']
import sys
from . import context
-from . import util
__all__ = ['send_handle', 'recv_handle', 'ForkingPickler', 'register', 'dump']
# python" would probably leave unlinked semaphores.
#
-import errno
import os
import signal
import sys
from . import spawn
from . import util
-from . import current_process
__all__ = ['ensure_running', 'register', 'unregister']
'Lock', 'RLock', 'Semaphore', 'BoundedSemaphore', 'Condition', 'Event'
]
-import os
import threading
import sys
-import itertools
import tempfile
import _multiprocessing
# Licensed to PSF under a Contributor Agreement.
#
-import sys
-import functools
import os
import itertools
import weakref
# Test retrieval when run as a script.
if __name__ == '__main__':
import argparse
- from email.utils import parsedate
parser = argparse.ArgumentParser(description="""\
nntplib built-in demo - display the latest articles in a newsgroup""")
"""
-from types import FunctionType, ModuleType
+from types import FunctionType
from copyreg import dispatch_table
from copyreg import _extension_registry, _inverted_registry, _extension_cache
from itertools import islice
# Import the needed APIs
try:
- import win32api
from win32api import RegQueryValueEx, RegOpenKeyEx, \
RegCloseKey, GetVersionEx
from win32con import HKEY_LOCAL_MACHINE, VER_PLATFORM_WIN32_NT, \
import warnings
from collections import deque
from reprlib import Repr
-from traceback import extract_tb, format_exception_only
+from traceback import format_exception_only
# --------------------------------------------------------- common routines
# to implement PEP 338 (Executing Modules as Scripts)
-import os
import sys
import importlib.machinery # importlib first so we can test #15386 via -m
import importlib.util
import socket
import select
-import sys
import os
import errno
try:
"""Internal support module for sre"""
-import _sre, sys
+import _sre
import sre_parse
from sre_constants import *
from _sre import MAXREPEAT
# XXX: show string offset and offending character for all errors
-import sys
-
from sre_constants import *
from _sre import MAXREPEAT
if sys.platform == "win32":
from _ssl import enum_certificates, enum_crls
-from socket import getnameinfo as _getnameinfo
-from socket import SHUT_RDWR as _SHUT_RDWR
from socket import socket, AF_INET, SOCK_STREAM, create_connection
from socket import SOL_SOCKET, SO_TYPE
import base64 # for DER-to-PEM translation
-import traceback
import errno
import io
import os
import time
-import traceback
-import gc
import signal
import builtins
import warnings
# from tarfile import *
__all__ = ["TarFile", "TarInfo", "is_tarfile", "TarError"]
-from builtins import open as _open # Since 'open' is TarFile.open
-
#---------------------------------------------------------
# tar constants
#---------------------------------------------------------
import sys as _sys
import _thread
-from time import sleep as _sleep
try:
from time import monotonic as _time
except ImportError:
# Attempt to configure Tcl/Tk without requiring PATH
from tkinter import _fix
-import warnings
-
import _tkinter # If this fails your Python may not be configured for Tk
TclError = _tkinter.TclError
from tkinter.constants import *
#
from tkinter import *
-from tkinter import _flatten, _cnfmerge, _default_root
+from tkinter import _cnfmerge, _default_root
# WARNING - TkVersion is a limited precision floating point number
if TkVersion < 3.999:
import shutil
import subprocess
import sys
-import sysconfig
import types
logger = logging.getLogger(__name__)
import http.client
import urllib.parse
from xml.parsers import expat
-import socket
import errno
from io import BytesIO
try: