관리-도구
편집 파일: utils.cpython-36.pyc
3 �Re�u � @ s� d Z ddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddlZddlm Z ddlmZ ddlmZ ddlmZ ddlmZ dd lmZmZmZmZmZmZmZmZmZmZm Z m!Z!m"Z"m#Z# dd l$m%Z% ddl&m'Z' ddl(m)Z)m*Z*m+Z+m,Z, dkZ-ej.� Z/ddd�Z0ej1dk�r:dd� Z2dd� Zdd� Z3dd� Z4dldd�Z5dd� Z6d d!� Z7d"d#� Z8d$d%� Z9d&d'� Z:d(d)� Z;dmd*d+�Z<d,d-� Z=d.d/� Z>d0d1� Z?d2d3� Z@d4d5� ZAd6d7� ZBd8d9� ZCd:d;� ZDeEdn�ZFd>d?� ZGd@dA� ZHdBdC� ZIdDdE� ZJdFdG� ZKdHdI� ZLejMdJdK� �ZNdLdM� ZOdodNdO�ZPdPdQ� ZQdpdSdT�ZRdUdV� ZSdWdX� ZTdYjUdZ�ZVeVd[ ZWeVd\ ZXd]d^� ZYd_d`� ZZdadb� Z[ej\dc�Z]ej\dd�Z^dedf� Z_dgdh� Z`didj� ZadS )qz� requests.utils ~~~~~~~~~~~~~~ This module provides utility functions that are used within Requests that are also useful for external consumption. � N)�OrderedDict� )�__version__)�certs)�to_native_string)�parse_http_list)�quote�urlparse�bytes�str�unquote� getproxies�proxy_bypass� urlunparse� basestring� integer_types�is_py3�proxy_bypass_environment�getproxies_environment�Mapping)�cookiejar_from_dict)�CaseInsensitiveDict)� InvalidURL� InvalidHeader�FileModeWarning�UnrewindableBodyError�.netrc�_netrc�P i� )�http�https�win32c C s� yt rdd l}ndd l}W n tk r. dS X y6|j|jd�}t|j|d�d �}|j|d�d }W n tk rz dS X | s�| r�dS |j d�}xX|D ]P}|dkr�d| kr�d S |j dd �}|j dd�}|j d d�}tj|| tj �r�d S q�W dS )Nr Fz;Software\Microsoft\Windows\CurrentVersion\Internet SettingsZProxyEnableZ ProxyOverride�;z<local>�.Tz\.�*z.*�?)r �winreg�_winreg�ImportError�OpenKey�HKEY_CURRENT_USER�int�QueryValueEx�OSError�split�replace�re�match�I)�hostr&