CoolFace
Apppublic

Aluode/PerceptionLabPortable

sourceHugging Faceupdated 9mo agoView on Hugging Face
0likes
syntax.cpython-310.pyc64 linesDownload Raw Back to __pycache__
1o

2�Yi�!�3@s$ddlZddlmZmZmZejZejZejZej	Z	ej4Z5ddd�ZGdd�d�ZGdd	�d	�Z
eejd6�eejd7�eej�eejd8�eej�eej�eejd�eejd9�eej�d�	Zee
jd10�ee
jd11�ee
j�ee
jd12�ee
j�ee
j�ee
jd�ee
jd13�ee
j�d�	ZGd
d�de14�ZdS)�N)�QtCore�QtGui�	QtWidgets�cCsHtj�|�}t�}|�|�d|vr|�tjj�d|vr"|�	d�|S)z=15    Return a QTextCharFormat with the given attributes.16    �bold�italicT)17�pgZ	functionsZmkColor�QTextCharFormatZ
setForegroundZ
setFontWeight�QFontZWeightZBoldZ
setFontItalic)�color�style�_color�_format�r��E:\DocsHouse\542 percep lab latest\PerceptionLab\PerceptionLab_Portable\python_embed\Lib\site-packages\pyqtgraph/examples/syntax.py�formats1819rc@�XeZdZdZdZdZdZdZdZdZ	dZ20d	Zd21ZdZ
dZd
ZdZdZdZdZdZdZdS)�LightThemeColorsz#B71C1Cz#FCE4ECz#4A148Cz#311B92z#1A237Ez#0D47A1z#01579Bz#006064z#004D40z#1B5E20z#33691Ez#827717z#F57F17z#FF6F00z#E65100z#BF360Cz#3E2723z#212121z#263238N��__name__�22__module__�__qualname__�RedZPink�Purple�23DeepPurple�Indigo�BlueZ	LightBlueZCyan�Teal�GreenZ24LightGreenZLimeZYellow�AmberZOrangeZ25DeepOrangeZBrownZGreyZBlueGreyrrrrr�(rc@r)�DarkThemeColorsz#F44336z#F48FB1z#CE93D8z#B39DDBz#9FA8DAz#90CAF9z#81D4FAz#80DEEAz#80CBC4z#A5D6A7z#C5E1A5z#E6EE9Cz#FFF59Dz#FFE082z#FFCC80z#FFAB91z#BCAAA4z#EEEEEEz#B0BEC5Nrrrrrr!5r r!rr)	�keyword�operator�brace�defclass�string�string2�comment�self�numbersc@sLeZdZdZgd�Zgd�Zgd�Zdd�Zedd��Z	d	d26�Z27dd�Zd
S)�PythonHighlighterz0Syntax highlighter for the Python language.28    )"�and�assert�break�class�continue�def�del�elif�else�except�exec�finally�for�from�global�if�import�in�is�lambda�not�or�pass�print�raise�return�try�while�yield�None�True�False�async�await)�=z==z!=�<z<=�>z>=z\+�-z\*�/z//z\%z\*\*z\+=z-=z\*=z/=z\%=z\^z\|z\&z\~z>>z<<)z\{z\}z\(z\)z\[z\]cCs�t�||�td�ddf|_td�ddf|_g}|dd�tjD�7}|dd�tjD�7}|d	d�tjD�7}|gd29�7}dd�|D�|_	dS)Nz'''�r'z"""�cS�g|]	}d|ddf�qS)z\b%s\brr"r)�.0�wrrr�30<listcomp>���z.PythonHighlighter.__init__.<locals>.<listcomp>cSrU)�%srr#r)rV�orrrrX�rYcSrU)rZrr$r)rV�brrrrX�rY)	)z\bself\brr))z\bdef\b\s*(\w+)rSr%)z\bclass\b\s*(\w+)rSr%)z\b[+-]?[0-9]+[lL]?\brr*)z\b[+-]?0[xX][0-9A-Fa-f]+[lL]?\brr*)z0\b[+-]?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?\brr*)z"[^"\\]*(\\.[^"\\]*)*"rr&)z'[^'\\]*(\\.[^'\\]*)*'rr&)z#[^\n]*rr(cSs g|]\}}}t|�||f�qSr)�QRegExp)rV�pat�index�fmtrrrrX�s�)31�QSyntaxHighlighter�__init__r]�32tri_single�33tri_doubler+�keywords�	operators�braces�rules)r)Zdocumentrhrrrrb�s"����zPythonHighlighter.__init__cCstj��}|�d�rtStS)NZdarkMode)rZQApplication�instance�property�DARK_STYLES�LIGHT_STYLES)r)Zapprrr�styles�s34zPythonHighlighter.stylesc35sJ|j��}g}|D]7\}}}|dvrq	|j|}tt�||��D]\}}||kr)q |��\��|����|�|���f�q q	|D]=\}}}|dvrMqC|j|}tt�||��D]%\}}||krcqZ|��\��t	��fdd�|D��rvqZ|����|�qZqC|�36|�|�d�|j|g|j
�R�}	|	s�|j|g|j�R�}	dSdS)z5Apply syntax highlighting to the given block of text.)r&r'c3s$�|]
\}}�|ko
�|kVqdS)Nr)rV�s�e��end�startrr�	<genexpr>�s�"z3PythonHighlighter.highlightBlock.<locals>.<genexpr>rN)rh�copyrm�	enumerate�re�finditer�span�	setFormat�append�anyZapplySearchHighlight�setCurrentBlockState�match_multilinercrd)37r)�textrhZstring_spans�38expressionZnthr�n�matchZin_multilinerrpr�highlightBlock�s>3940�41�4243�z PythonHighlighter.highlightBlockc	Cs�|��|krd}d}n	|�|�}|��}|dkrW|�|||�}||kr4||||��}|�d�n
|�|�t|�||}|�|||j|�|�|||�}|dks|��|kr_dSdS)arDo highlighting of multi-line strings. ``delimiter`` should be a44        ``QRegExp`` for triple-single-quotes or triple-double-quotes, and45        ``in_state`` should be a unique integer to represent the corresponding46        state changes when inside those strings. Returns True if we're still47        inside a multi-line string when this function is finished.48        rTF)ZpreviousBlockStateZindexInZ
matchedLengthr|�lenryrmZcurrentBlockState)	r)r~�	delimiterZin_staterrr�addrq�lengthrrrr}�s$4950�z!PythonHighlighter.match_multilineN)rrr�__doc__rerfrgrbrjrmr�r}rrrrr+fs51
152'r+)r)Z	pyqtgraphrZpyqtgraph.Qtrrrr]r53ZQColorr	rarrr!rrrrrrrrrlrkr+rrrr�<module>s>545556575859�6061626364�
Aluode/PerceptionLabPortable · CoolFace