³ò
°QþNc           @   sÎ   d  Z  d d k Z d d k Z d d k Z d d k Z e i d ƒ d d k Z d d k Z d d k Z d d k	 Z	 d d k
 l Z d „  Z d „  Z d e f d „  ƒ  YZ d	 e f d
 „  ƒ  YZ d „  Z d S(   s(   

    KeepNote
    Python Shell Dialog

iÿÿÿÿNs   2.0(   t   Actionc         C   sR   |  i  ƒ  pA |  i ƒ  d j o |  i ƒ  |  i ƒ  qN |  i ƒ  i ƒ  }  n |  S(   s.   Move a TextIter it to the start of a paragraphi    (   t   starts_linet   get_linet   backward_linet   forward_linet
   get_buffert   get_start_iter(   t   it(    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyt   move_to_start_of_line-   s    
c         C   s   |  i  ƒ  |  S(   s.   Move a TextIter it to the start of a paragraph(   R   (   R   (    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyt   move_to_end_of_line8   s    
t   Streamc           B   s#   e  Z d  „  Z d „  Z d „  Z RS(   c         C   s   | |  _  d  S(   N(   t	   _callback(   t   selft   callback(    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyt   __init__@   s    c         C   s   |  i  | ƒ d  S(   N(   R   (   R   t   text(    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyt   writeC   s    c         C   s   d  S(   N(    (   R   (    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyt   flushF   s    (   t   __name__t
   __module__R   R   R   (    (    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyR
   >   s   		t   PythonDialogc           B   sP   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z d d „ Z d „  Z	 RS(	   s   Python dialogc            s¶   | ˆ  _  | i ƒ  ˆ  _ t ˆ  i ƒ ˆ  _ t ‡  f d †  ƒ ˆ  _ t i ƒ  ˆ  _	 ˆ  i	 i
 d d ƒ ˆ  i	 i
 d t i ƒ t i ƒ  ˆ  _ ˆ  i i
 d d ƒ ˆ  i i
 d t i ƒ d  S(   Nc            s   ˆ  i  |  d  ƒ S(   t   error(   t   output_text(   t   t(   R   (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyt   <lambda>S   s    t
   foregroundt   redt   weightt   blue(   t   main_windowt   get_appt   appR
   R   t   outfilet   errfilet   gtkt   TextTagt	   error_tagt   set_propertyt   pangot   WEIGHT_BOLDt   info_tag(   R   R   (    (   R   sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyR   N   s    	c            s1  h  ˆ  i  d <ˆ  i d <ˆ  i d <ˆ  _ t i t i ƒ ˆ  _ ˆ  i i d ‡  f d †  ƒ ˆ  ˆ  i _	 ˆ  i i
 d d ƒ t i ƒ  ˆ  _ ˆ  i i ˆ  i ƒ ˆ  i i d ƒ t i ƒ  ˆ  _ ˆ  i i d ˆ  i ƒ t i d	 ƒ } ˆ  i i | ƒ t i ƒ  } | i t i t i ƒ | i t i ƒ | i ˆ  i ƒ ˆ  i i | ƒ t i ƒ  ˆ  _ ˆ  i i t i ƒ t i d	 ƒ } ˆ  i i | ƒ t i ƒ  } | i t i t i ƒ | i t i ƒ | i ˆ  i ƒ ˆ  i i | ƒ ˆ  i i ƒ  i  i ˆ  i! ƒ ˆ  i i ƒ  i  i ˆ  i" ƒ ˆ  i i# ƒ  ˆ  i$ d
 d ƒ d  S(   NR   t   windowt   infos   delete-eventc            s   ˆ  i  i ƒ  S(    (   t   dialogt   destroy(   t   dt   r(   R   (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyR   g   s    i  iÈ   s   key-press-events   Courier News&   Press Ctrl+Enter to execute. Ready...
(%   R   R   t
   print_infot   envR"   t   Windowt   WINDOW_TOPLEVELR+   t   connectt   ptrt   set_default_sizet   VPanedt   vpanedt   addt   set_positiont   TextViewt   editort   on_key_press_eventR&   t   FontDescriptiont   modify_fontt   ScrolledWindowt
   set_policyt   POLICY_AUTOMATICt   set_shadow_typet	   SHADOW_INt   add1t   outputt   set_wrap_modet	   WRAP_WORDt   add2R   t	   tag_tableR$   R(   t   show_allR   (   R   t   ft   sw(    (   R   sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyt   show^   s@    c         C   sh   | i  t i i j o& | i t i i @o |  i ƒ  t Sn | i  t i i j o |  i	 ƒ  t Sn d S(   s   Callback from key press eventN(
   t   keyvalR"   t   keysymst   Returnt   statet   gdkt   CONTROL_MASKt   execute_buffert   Truet   newline_indent(   R   t   textviewt   event(    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyR<      s    

c         C   sŸ   |  i  i ƒ  } | i | i ƒ  ƒ } | i ƒ  } t | ƒ } | i | ƒ } g  } x- | D]% } | d j o | i | ƒ qX PqX W| i d d i	 | ƒ ƒ d S(   s   Insert a newline and indents    	s   
t    N(
   R;   R   t   get_iter_at_markt
   get_insertt   copyR   t   get_textt   appendt   insert_at_cursort   join(   R   t   bufR   t   startt   linet   indentt   c(    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyRV   ž   s     c         C   s¥   |  i  i ƒ  } | i ƒ  } t | ƒ d j o  | \ } } |  i d d ƒ n) | i ƒ  } | i ƒ  } |  i d d ƒ | i | ƒ } t | |  i	 |  i
 |  i ƒ d S(   s   Execute code in bufferi    s   executing selection:
R*   s   executing buffer:
N(   R;   R   t   get_selection_boundst   lenR   R   t   get_end_iterR]   t   executeR0   R    R!   (   R   Ra   t   selRb   t   endR   (    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyRT   °   s    t   normalc         C   sØ   |  i  i ƒ  } | i ƒ  } | i | ƒ } | i ƒ  } | d j o  | i | i ƒ  | |  i ƒ nD | d j o  | i | i ƒ  | |  i ƒ n | i	 | i ƒ  | ƒ | o' | i
 | i ƒ  ƒ |  i  i | ƒ n d S(   s   Output text to output bufferR   R*   N(   RE   R   R[   RZ   t   is_endt   insert_with_tagsRh   R$   R(   t   insertt   place_cursort   scroll_mark_onscreen(   R   R   t   modeRa   t   markR   t   follow(    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyR   Ç   s      c         C   sJ   d GHd GHHt  i t i ƒ d GHd GHd i d „  |  i i ƒ  Dƒ ƒ GHd  S(   Ns   COMMON INFORMATIONs   ==================s   Open notebookss   --------------s   
c         s   s   x |  ] } | i  ƒ  Vq Wd  S(   N(   t   get_path(   t   .0t   n(    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pys	   <genexpr>è   s   	 (   t   keepnotet   print_runtime_infot   syst   stdoutR`   R   t   iter_notebooks(   R   (    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyR/   Þ   s    (
   R   R   t   __doc__R   RM   R<   RV   RT   R   R/   (    (    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyR   K   s   		1			c         B   s   e  i } e  i } | e  _ | e  _ y |  | f d UWn2 e j
 o& } e i | e  i ƒ  d | ƒ n X| e  _ | e  _ d S(   s   Execute user's python codeNi   (   Rz   R{   t   stderrt	   ExceptionRx   t	   log_errort   exc_info(   t   codet   varsR{   R~   t   __stdoutt   __stderrt   e(    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pyRi   ì   s    				"	(   R}   t   osRz   t   StringIOt   pygtkt   requireR"   t   gtk.gdkR&   Rx   t   keepnote.guiR    R   R	   t   objectR
   R   Ri   (    (    (    sž   \\192.168.178.73\Gero\!!!!!!!!!!!!!!! Neue Aufgaben ab 26.02.2022\2 Datenbank portable\KeepNotePortable\App\KeepNote\extensions\python_prompt\dialog_python.pys   <module>   s   		¡