ž
©ÿfã( c @ sð d d l Z d d l Z d d l Z d d l Z d d l Td d l m Z d d l m Z d Z
d d „ Z d d „ Z e j
e ƒ e j ƒ Z e j
d e j ƒ Z e j
d
ƒ Z Gd d „ d e ƒ Z d
d „ Z e d k rì e ƒ n d S( i N( u *( u Delegator( u idleConfc C s d | d j | ƒ d S( u9 Return a named group pattern matching list of alternates.u (?P<%s>u |u )( u join( u nameu
alternates( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu any s u anyc
C sÕ d t d t j ƒ d } d d „ t t ƒ Dƒ } d t d | ƒ d } t d d g ƒ } d } | d
} | d } | d } | d
} t d | | | | g ƒ } | d | d | d | d t d d g ƒ S( Nu \bu KEYWORDc S s; g | ]1 } | j d ƒ r | t j k r t | ƒ ‘ q S( u _( u
startswithu keywordu kwlistu str( u .0u name( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu
s u make_pat..u ([^.'\"\\#]\b|^)u BUILTINu COMMENTu #[^\n]*u4 (\br|u|ur|R|U|UR|Ur|uR|b|B|br|Br|bR|BR|rb|rB|Rb|RB)?u '[^'\\\n]*(\\.[^'\\\n]*)*'?u "[^"\\\n]*(\\.[^"\\\n]*)*"?u' '''[^'\\]*((\\.|'(?!''))[^'\\]*)*(''')?u' """[^"\\]*((\\.|"(?!""))[^"\\]*)*(""")?u STRINGu |u SYNCu \n( u anyu keywordu kwlistu diru builtins(
u kwu builtinlistu builtinu commentu stringprefixu sqstringu dqstringu sq3stringu dq3stringu string( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu make_pat s
u make_patu \s+(\w+)u .*?\b(as)\bc B sÈ | Ee Z d Z d d „ Z d d „ Z d d „ Z d d „ Z d d d
„ Z d d d „ Z d Z
d Z d Z d d
d „ Z d Z d d d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d S( u ColorDelegatorc C s6 t j | ƒ t | _ t | _ t | _ | j ƒ d S( N( u Delegatoru __init__u progu idprogu asprogu LoadTagDefs( u self( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu __init__' s
u ColorDelegator.__init__c C s | j d k r | j d ƒ n t j | | ƒ | d k rk | j ƒ | j d | j ƒ | j d d ƒ n d | _
d | _ d S( Nu <>u 1.0u endTF(
u delegateu Noneu unbindu Delegatoru setdelegateu
config_colorsu bindu toggle_colorize_eventu notify_rangeu Trueu stop_colorizingu Falseu allow_colorizing( u selfu delegate( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu setdelegate. s
u ColorDelegator.setdelegatec C sJ x6 | j j ƒ D]% \ } } | r | j | | q q W| j d ƒ d S( Nu sel( u tagdefsu itemsu
tag_configureu tag_raise( u selfu tagu cnf( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu
config_colors; s u ColorDelegator.config_colorsc C sý t j d d d ƒ } i
t j | d ƒ d 6t j | d ƒ d 6t j | d ƒ d 6t j | d
ƒ d 6t j | d ƒ d
6i d d 6d d 6d 6i d d 6d d 6d 6t j | d ƒ d 6t j | d ƒ d 6t j | d ƒ d 6| _ t rù t d | j ƒ n d S( Nu mainu Themeu nameu commentu COMMENTu keywordu KEYWORDu builtinu BUILTINu stringu STRINGu
definitionu
DEFINITIONu
backgroundu
foregroundu SYNCu TODOu breaku BREAKu erroru ERRORu hitu tagdefs( u idleConfu GetOptionu GetHighlightu Noneu tagdefsu DEBUGu print( u selfu theme( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu LoadTagDefsA s u ColorDelegator.LoadTagDefsc C sG | j | ƒ } | j j | | | ƒ | j | | d t | ƒ ƒ d S( Nu +%dc( u indexu delegateu insertu notify_rangeu len( u selfu indexu charsu tags( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu insertS s u ColorDelegator.insertc C s3 | j | ƒ } | j j | | ƒ | j | ƒ d S( N( u indexu delegateu deleteu notify_range( u selfu index1u index2( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu deleteX s u ColorDelegator.deletec C s– | j d | | ƒ | j r3 t r/ t d ƒ n d S| j r[ d | _ t r[ t d ƒ q[ n | j r’ t rw t d ƒ n | j d | j ƒ | _ n d S( Nu TODOu colorizing already scheduledu stop colorizingu schedule colorizingi T(
u tag_addu after_idu DEBUGu printu
colorizingu Trueu stop_colorizingu allow_colorizingu afteru
recolorize( u selfu index1u index2( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu notify_rangea s
u ColorDelegator.notify_rangec C s| | j r> | j } d | _ t r. t d ƒ n | j | ƒ n d | _ d | _ | rx | j sl | j
ƒ qx | | _ n d S( Nu cancel scheduled recolorizerFT( u after_idu Noneu DEBUGu printu after_cancelu Falseu allow_colorizingu Trueu stop_colorizingu
colorizingu destroyu close_when_done( u selfu close_when_doneu after_id( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu closeo s
u ColorDelegator.closec C sÓ | j r> | j } d | _ t r. t d ƒ n | j | ƒ n | j ro | j ro t rc t d ƒ n d | _ n | j | _ | j rª | j rª | j d | j
ƒ | _ n t rÏ t d | j rÅ d pÈ d ƒ n d S( Nu cancel scheduled recolorizeru stop colorizingi u auto colorizing turnedu onu offu breakT( u after_idu Noneu DEBUGu printu after_cancelu allow_colorizingu
colorizingu Trueu stop_colorizingu afteru
recolorize( u selfu eventu after_id( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu toggle_colorize_event} s"
u$ ColorDelegator.toggle_colorize_eventc C sQ d | _ | j s) t r% t d ƒ n d S| j sI t rE t d ƒ n d S| j ri t re t d ƒ n d Szf d
| _ d | _ t r‘ t d ƒ n t
j ƒ } | j ƒ t
j ƒ } t rÎ t d | | ƒ n Wd d
| _ X| j r%| j
d d ƒ r%t r
t d ƒ n | j d | j ƒ | _ n | j rM| j } d | _ | j ƒ n d S( Nu no delegateu auto colorizing is offu already colorizingu
colorizing...u %.3f secondsu TODOu 1.0u reschedule colorizingi FT( u Noneu after_idu delegateu DEBUGu printu allow_colorizingu
colorizingu Falseu stop_colorizingu Trueu timeu perf_counteru recolorize_mainu
tag_nextrangeu afteru
recolorizeu close_when_doneu destroy( u selfu t0u t1u top( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu
recolorizeŽ s@
u ColorDelegator.recolorizec C s> d } x1| j d | ƒ } | s% Pn | \ } } | j d | | ƒ | j d | ƒ } | ri | d } n d } d } | } d } d } x| s6| } | j | d | ƒ } t | d d ƒ } d | j | d ƒ k } | j | | ƒ } | sõ d Sx$ | j D] }
| j |
| | ƒ qÿ W| | } | j j
| ƒ } x‡| rÁx_| j ƒ j ƒ D]K\ } }
|
rT| j
| ƒ \ } } | j | | d
| | d
| ƒ |
d k r| j j | | ƒ } | rœ| j
d ƒ \ } } | j d
| d
| | d
| ƒ qœqŸ|
d k rŸd | k r-| j d ƒ } n t | ƒ } x` | j j | | | ƒ } | s^Pn | j
d ƒ \ } } | j d | d
| | d
| ƒ q<qŸqTqTW| j j
| | j ƒ ƒ } q;Wd | j | d ƒ k rê| } d } n d } | s | j d | ƒ n | j ƒ | j rŠ t r/t d ƒ n d SqŠ Wq d S( Nu 1.0u TODOu SYNCi u u +%d lines linestarti id u -1cu +%dcu defu classu
DEFINITIONu importu #u KEYWORDu colorizing stoppedF( u defu class( u
tag_nextrangeu
tag_removeu
tag_prevrangeu Falseu indexu minu tag_namesu getu tagdefsu progu searchu groupdictu itemsu spanu tag_addu idprogu matchu lenu asprogu endu updateu stop_colorizingu DEBUGu print( u selfu nextu itemu headu tailu charsu lines_to_getu oku marku lineu tagu mu keyu valueu au bu m1u endpos( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu recolorize_main« s„
u ColorDelegator.recolorize_mainc C s+ x$ | j D] } | j | d d ƒ q
Wd S( Nu 1.0u end( u tagdefsu
tag_remove( u selfu tag( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu removecolorsü s u ColorDelegator.removecolorsNTF( u __name__u
__module__u __qualname__u __init__u setdelegateu
config_colorsu LoadTagDefsu Noneu insertu deleteu after_idu Trueu allow_colorizingu Falseu
colorizingu notify_rangeu close_when_doneu closeu toggle_colorize_eventu
recolorizeu recolorize_mainu removecolors( u
__locals__( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu ColorDelegator% s
Qu ColorDelegatorc C s‹ d d l m } t ƒ } | j d | j ƒ t d d ƒ } | j d d d d ƒ | j ƒ | | ƒ } t ƒ } | j | ƒ | j
ƒ d S(
Ni ( u
Percolatoru WM_DELETE_WINDOWu
backgroundu whiteu expandi u fillu both( u idlelib.Percolatoru
Percolatoru Tku wm_protocolu quitu Textu packu focus_setu ColorDelegatoru insertfilteru mainloop( u
Percolatoru rootu textu pu d( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu main s
u mainu __main__F( u timeu reu keywordu builtinsu tkinteru idlelib.Delegatoru Delegatoru idlelib.configHandleru idleConfu Falseu DEBUGu anyu make_patu compileu Su progu idprogu asprogu ColorDelegatoru mainu __name__( ( ( u; /opt/alt/python33/lib64/python3.3/idlelib/ColorDelegator.pyu s
Û