AlkantarClanX12
Current Path : /usr/lib64/python3.6/__pycache__/ |
Current File : //usr/lib64/python3.6/__pycache__/formatter.cpython-36.opt-1.pyc |
3 \'; � @ s� d Z ddlZddlZejdedd� dZG dd� d�ZG dd � d �ZG d d� d�ZG dd � d e�Z G dd� de�Z ddd�Zedkr�e� dS )a Generic output formatting. Formatter objects transform an abstract flow of formatting events into specific output events on writer objects. Formatters manage several stack structures to allow various properties of a writer object to be changed and restored; writers need not be able to handle relative changes nor any sort of ``change back'' operation. Specific writer properties which may be controlled via formatter objects are horizontal alignment, font, and left margin indentations. A mechanism is provided which supports providing arbitrary, non-exclusive style settings to a writer as well. Additional interfaces facilitate formatting events which are not reversible, such as paragraph separation. Writer objects encapsulate device interfaces. Abstract devices, such as file formats, are supported as well as physical devices. The provided implementations all work with abstract devices. The interface makes available mechanisms for setting the properties which formatter objects manage and inserting data into the output. � Nz"the formatter module is deprecated� )� stacklevelc @ s� e Zd ZdZd(dd�Zdd� Zdd� Zd d � Zd)dd�Zd d� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� Zdd � Zd!d"� Zd*d$d%�Zd+d&d'�ZdS ),� NullFormattera= A formatter which does nothing. If the writer parameter is omitted, a NullWriter instance is created. No methods of the writer are called by NullFormatter instances. Implementations should inherit from this class if implementing a writer interface but don't need to inherit any implementation. Nc C s |d krt � }|| _d S )N)� NullWriter�writer)�selfr � r �!/usr/lib64/python3.6/formatter.py�__init__) s zNullFormatter.__init__c C s d S )Nr )r � blankliner r r � end_paragraph- s zNullFormatter.end_paragraphc C s d S )Nr )r r r r �add_line_break. s zNullFormatter.add_line_breakc O s d S )Nr )r �args�kwr r r �add_hor_rule/ s zNullFormatter.add_hor_rulec C s d S )Nr )r �format�counterr r r r �add_label_data0 s zNullFormatter.add_label_datac C s d S )Nr )r �datar r r �add_flowing_data1 s zNullFormatter.add_flowing_datac C s d S )Nr )r r r r r �add_literal_data2 s zNullFormatter.add_literal_datac C s d S )Nr )r r r r �flush_softspace3 s zNullFormatter.flush_softspacec C s d S )Nr )r �alignr r r �push_alignment4 s zNullFormatter.push_alignmentc C s d S )Nr )r r r r � pop_alignment5 s zNullFormatter.pop_alignmentc C s d S )Nr )r �xr r r � push_font6 s zNullFormatter.push_fontc C s d S )Nr )r r r r �pop_font7 s zNullFormatter.pop_fontc C s d S )Nr )r �marginr r r �push_margin8 s zNullFormatter.push_marginc C s d S )Nr )r r r r � pop_margin9 s zNullFormatter.pop_marginc C s d S )Nr )r �spacingr r r �set_spacing: s zNullFormatter.set_spacingc G s d S )Nr )r �stylesr r r � push_style; s zNullFormatter.push_style� c C s d S )Nr )r �nr r r � pop_style<