ok
Direktori : /lib64/python2.7/idlelib/ |
Current File : //lib64/python2.7/idlelib/CodeContext.pyo |
� {fc @ s� d Z d d l Z d d l m Z m Z m Z m Z m Z d d l Z d d l m Z d d l m Z d d d d d d d d d d d h Z d Z d Z e j d � d � Z d d d � � YZ d S( sI CodeContext - Extension to display the block context above the edit window Once code has scrolled off the top of a window, it can be difficult to determine which block you are in. This extension implements a pane at the top of each IDLE edit window which provides block structure hints. These hints are the lines which contain the block opening keywords, e.g. 'if', for the enclosing block. The number of hint lines is determined by the numlines variable in the CodeContext section of config-extensions.def. Lines which do not open blocks are not shown in the context hints pane. i����N( t TOPt LEFTt Xt Wt SUNKEN( t maxint( t idleConft classt deft elift elset exceptt finallyt fort ift tryt whilet withid i� s ^(\s*)(\w*)c C s | j | � j � S( N( t matcht groups( t st c( ( s+ /usr/lib64/python2.7/idlelib/CodeContext.pyt <lambda> t t CodeContextc B s� e Z d d g f g Z e j d d d d d d d �Z e j d d d d d d d �Z e j d d d d d d d �Z d � Z d d � Z d � Z d d d � Z d � Z d � Z d � Z RS( t optionss !Code Conte_xts <<toggle-code-context>>t extensionsR t numlinest typet intt defaulti t bgcolort strt LightGrayt fgcolort Blackc C s� | | _ | j | _ | j d | _ d | _ d d d t f g | _ d | _ t j d d d d d d t �} | r� | j � | j j d t � n | j j t | j � | j j t | j � d S( Nt fonti i����R i R R t visibleR t boolR s <<toggle-code-context>>( t editwint textt textfontt Nonet labelt Falset infot topvisibleR t GetOptiont toggle_code_context_eventt setvart Truet aftert UPDATEINTERVALt timer_eventt FONTUPDATEINTERVALt font_timer_event( t selfR'