|
Server : Apache System : Linux server.mata-lashes.com 3.10.0-1160.90.1.el7.x86_64 #1 SMP Thu May 4 15:21:22 UTC 2023 x86_64 User : matalashes ( 1004) PHP Version : 8.1.29 Disable Function : NONE Directory : /usr/local/lib/python3.6/site-packages/serial/tools/__pycache__/ |
Upload File : |
3 F�Kd] � @ s� d Z ddlmZ ddlZddlZye W n eefk rD eZY nX dZ ddd�Z ddd �ZG d d� dej�ZG dd � d ej �Z G dd� dej�ZG dd� deej�ZG dd� deej�Zdd� ZdS )aL Python 'hex' Codec - 2-digit hex with spaces content transfer encoding. Encode and decode may be a bit missleading at first sight... The textual representation is a hex dump: e.g. "40 41" The "encoded" data of this is the binary form, e.g. b"@A" Therefore decoding is binary to text and thus converting binary data to hex dump. � )�absolute_importNZ0123456789ABCDEF�strictc C s t jdd� | j� D ��t| �fS )z'40 41 42' -> b'@ab'c S s g | ]}t |d ��qS )� )�int)�.0�h� r �>/tmp/pip-build-8nxjc3nm/pyserial/serial/tools/hexlify_codec.py� <listcomp>( s zhex_encode.<locals>.<listcomp>)�serial�to_bytes�split�len)�data�errorsr r r � hex_encode&