OwlCyberSecurity - MANAGER
Edit File: __init__.cpython-38.pyc
U ��]� � @ sj d dl Z d dlZd dlZd dlZd dlZd dlmZ d dlmZ e�e �Z dd� Ze�d�d dd��Z dS ) � N)�cbook)�_Backendc C s t j�d�pt j�d�} | r*| j�� r*dS t j�d�p@t j�d�}|rT|j�� rTdS t j�d�}|rp|�� rpdS t j�d �}|r�|�� r�d S t j�d �}|r�t �� �� D ]$}|r�|j |j jkr� dS |j}q�q�dt jkr�t jd � � r�d S t j�d��r tj�d��s dS dS )a/ Return the interactive framework whose event loop is currently running, if any, or "headless" if no event loop can be started, or None. Returns ------- Optional[str] One of the following values: "qt5", "qt4", "gtk3", "wx", "tk", "macosx", "headless", ``None``. zPyQt5.QtWidgetszPySide2.QtWidgetsZqt5zPyQt4.QtGuizPySide.QtGuiZqt4zgi.repository.GtkZgtk3�wx�tkinterZtkzmatplotlib.backends._macosxZmacosxZlinuxZDISPLAYZheadlessN)�sys�modules�getZQApplication�instanceZ main_levelZGetApp�_current_frames�values�f_codeZmainloop�__code__�f_backZevent_loop_is_running�platform� startswith�os�environ)Z QtWidgetsZQtGuiZGtkr r �frame� r �>/usr/lib/python3/dist-packages/matplotlib/backends/__init__.py�"_get_running_interactive_framework s: � � r z3.0c C sv | dkrt �� } | �d�r&| dd� nd�| �� �}t�|�}tdtft |��}| a t�d| |j � ||j|j|jfS )a Return new_figure_manager, draw_if_interactive and show for pyplot. This provides the backend-specific functions that are used by pyplot to abstract away the difference between backends. Parameters ---------- name : str, optional The name of the backend to use. If `None`, falls back to ``matplotlib.get_backend()`` (which return :rc:`backend`). Returns ------- backend_mod : module The module which contains the backend of choice new_figure_manager : function Create a new figure manager (roughly maps to GUI window) draw_if_interactive : function Redraw the current figure if pyplot is interactive show : function Show (and possibly block) any unshown figures. Nz module://� zmatplotlib.backends.backend_{}�Backendzbackend %s version %s)� matplotlibZget_backendr �format�lower� importlib� import_module�typer �varsZbackend�_log�debugZbackend_versionZnew_figure_managerZdraw_if_interactiveZshow)�nameZbackend_nameZbackend_modr r r r �pylab_setup9 s � �r# )N)r Zloggingr r r r Zmatplotlib.backend_basesr Z getLogger�__name__r r Z deprecatedr# r r r r �<module> s (