%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /lib/python3/dist-packages/twisted/python/__pycache__/
Upload File :
Create Path :
Current File : //lib/python3/dist-packages/twisted/python/__pycache__/win32.cpython-312.pyc

�

Ϫ�f����UdZddlZddlZddlmZddlmZdZdZdZ	dZ
eed	d�ZGd
�de
�Zeedd
dd�ddd�	eZe
ed<eedd
dd�ddd�ej$d�Zej$d�Zd�Zd�ZGd�d�Zej1�j2Zy#e$reZY�lwxYw)z�
Win32 utilities.

See also twisted.python.shortcut.

@var O_BINARY: the 'binary' mode flag on Windows, or 0 on other platforms, so it
    may safely be OR'ed into a mask for os.open.
�N)�Version)�deprecatedModuleAttribute���{i�O_BINARYc��eZdZdZy)�FakeWindowsErrorz\
    Stand-in for sometimes-builtin exception on platforms for which it
    is missing.
    N)�__name__�
__module__�__qualname__�__doc__���6/usr/lib/python3/dist-packages/twisted/python/win32.pyr
r
s��rr
�Twisted�z9Catch OSError and check presence of 'winerror' attribute.ztwisted.python.win32�WindowsErrorz(\\*)"z(\\+)\Zc��d|vxsd|vxsd|vxs|dk(xrdxsd}|tjdtjd|��z|zS)aL
    Internal method for quoting a single command-line argument.

    @param s: an unquoted string that you want to quote so that something that
        does cmd.exe-style unquoting will interpret it as a single argument,
        even if it contains spaces.
    @type s: C{str}

    @return: a quoted string.
    @rtype: C{str}
    � �	�"�z\1\1z\1\1\\")�_cmdLineQuoteRe2�sub�_cmdLineQuoteRe)�s�quotes  r�cmdLineQuoter>se���Q�h�
?�D�A�I�
?�3�!�8�
?��R��H�S�N�B�E�
�
�
�
�w��(;�(;�J��(J�
K�	L�
�	�rc�\�dj|D�cgc]
}t|���c}�Scc}w)a`
    Quote an iterable of command-line arguments for passing to CreateProcess or
    a similar API.  This allows the list passed to C{reactor.spawnProcess} to
    match the child process's C{sys.argv} properly.

    @param arguments: an iterable of C{str}, each unquoted.

    @return: a single string, with the given sequence quoted as necessary.
    r)�joinr)�	arguments�as  r�quoteArgumentsr$Rs%���8�8�i�8��\�!�_�8�9�9��8s�)c�,�eZdZdZd�Zed��Zd�Zy)�_ErrorFormattera{
    Formatter for Windows error messages.

    @ivar winError: A callable which takes one integer error number argument
        and returns a L{WindowsError} instance for that error (like
        L{ctypes.WinError}).

    @ivar formatMessage: A callable which takes one integer error number
        argument and returns a C{str} giving the message for that error (like
        U{win32api.FormatMessage<http://
        timgolden.me.uk/pywin32-docs/win32api__FormatMessage_meth.html>}).

    @ivar errorTab: A mapping from integer error numbers to C{str} messages
        which correspond to those erorrs (like I{socket.errorTab}).
    c�.�||_||_||_y)N)�winError�
formatMessage�errorTab)�self�WinError�
FormatMessager*s    r�__init__z_ErrorFormatter.__init__ps�� ��
�*��� ��
rc��	ddlm}	ddlm}	ddlm}||||�S#t$rd}Y�%wxYw#t$rd}Y�/wxYw#t$rd}Y�9wxYw)z�
        Get as many of the platform-specific error translation objects as
        possible and return an instance of C{cls} created with them.
        r)r,N)r-)r*)�ctypesr,�ImportError�win32apir-�socketr*)�clsr,r-r*s    r�fromEnvironmentz_ErrorFormatter.fromEnvironmentusk��	�'�	!�.�	�'��8�]�H�5�5���	��H�	���	!� �M�	!���	��H�	�s)� �1�A�.�.�?�?�A�Ac�
�|j�|j|�jS|j�|j|�S|j�|jj	|�}|�|Stj|�S)a�
        Returns the string associated with a Windows error message, such as the
        ones found in socket.error.

        Attempts direct lookup against the win32 API via ctypes and then
        pywin32 if available), then in the error table in the socket module,
        then finally defaulting to C{os.strerror}.

        @param errorcode: the Windows error code
        @type errorcode: C{int}

        @return: The error message string
        @rtype: C{str}
        )r(�strerrorr)r*�get�os)r+�	errorcode�results   r�formatErrorz_ErrorFormatter.formatError�sx���=�=�$��=�=��+�4�4�4����)��%�%�i�0�0��=�=�$��]�]�&�&�y�1�F��!��
��{�{�9�%�%rN)rrr
rr.�classmethodr5r<rrrr&r&_s%��� !�
�6��6�&&rr&)rr9�re�incrementalr�twisted.python.deprecater�ERROR_FILE_NOT_FOUND�ERROR_PATH_NOT_FOUND�ERROR_INVALID_NAME�ERROR_DIRECTORY�getattrr�OSErrorr
r�__annotations__�	NameError�compilerrrr$r&r5r<rrr�<module>rJs��
�
�	��>����������2�z�1�%���w����I�r�1�a� �?���	�$�(�L�'�(���I�r�1�a� �?���	��"�*�*�Y�'���2�:�:�j�)���(
:�A&�A&�H�-�-�/�;�;���i�$�#�L�$�s�
B4�4B>�=B>

Zerion Mini Shell 1.0