Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/openpyxl/worksheet/__pycache__/header_footer.cpython-37.pyc
Назад
B �5�g� � @ s� d dl Z d dlmZ d dlmZmZmZmZmZm Z m Z d dlmZ d dl mZ d dlmZmZ dZdZd Ze �d �eee��Zdd� ZG d d� de�ZG dd� de�ZG dd� de�ZdS )� N)�warn)�Alias�Bool�Strict�String�Integer�MatchPattern�Typed)�Serialisable)�Element)�escape�unescapez&"(?P<font>.+)"z&K(?P<color>[A-F0-9]{6})z&(?P<size>\d+\s?)z{0}|{1}|{2}c C sX t �dt jt jB �}|�| �}y|�� }W n( tk rR td� dddd�}Y nX |S )z� Split the combined (decoded) string into left, center and right parts # See http://stackoverflow.com/questions/27711175/regex-with-multiple-optional-groups for discussion zN (&L(?P<left>.+?))? (&C(?P<center>.+?))? (&R(?P<right>.+?))? $z3Cannot parse header or footer so it will be ignored� )�left�right�center)�re�compile�VERBOSE�DOTALL�match� groupdict�AttributeErrorr )�textZ ITEM_REGEX�m�parts� r �V/home/digitalm-up/venv/lib/python3.7/site-packages/openpyxl/worksheet/header_footer.py� _split_string s r c @ sd e Zd ZdZedd�Zedd�Zedd�ZdZ e de d�Zddd�Zd d � Z dd� Zed d� �ZdS )�_HeaderFooterParta� Individual left/center/right header/footer part Do not use directly. Header & Footer ampersand codes: * &A Inserts the worksheet name * &B Toggles bold * &D or &[Date] Inserts the current date * &E Toggles double-underline * &F or &[File] Inserts the workbook name * &I Toggles italic * &N or &[Pages] Inserts the total page count * &S Toggles strikethrough * &T Inserts the current time * &[Tab] Inserts the worksheet name * &U Toggles underline * &X Toggles superscript * &Y Toggles subscript * &P or &[Page] Inserts the current page number * &P+n Inserts the page number incremented by n * &P-n Inserts the page number decremented by n * &[Path] Inserts the workbook path * && Escapes the ampersand character * &"fontname" Selects the named font * &nn Selects the specified 2-digit font point size Colours are in RGB Hex T)� allow_nonez^[A-Fa-f0-9]{6}$)r �patternNc C s || _ || _|| _|| _d S )N)r �font�size�color)�selfr r"