;ò
ÎÑAHc           @   s°   d  Z  d k Z e i i ƒ  Z d k l Z d k Z e	 d „ Z
 d d „ Z d d „ Z d d	 „ Z d
 d „ Z e d „ Z d d „ Z d d „ Z d d „ Z d d „ Z d S(   s™    'editor' hooks for common editors that work well with ipython

They should honor the line number argument, at least.

Contributions are *very* welcome.
N(   s   itplnsc            s&   d ‡  ‡ d † } t i d | ƒ d S(   s   Gets a template in format "myeditor bah bah $file bah bah $line"
    
    $file will be replaced by file name, $line by line number (or 0).
    Installs the editor that is called by IPython, instead of the default
    notepad or vi.
    
    If wait is true, wait until the user presses enter before returning,
    to facilitate non-blocking editors that exit immediately after
    the call.
    i    c            sX   | t j o
 d } n t ˆ  t ƒ  ƒ } d G| GHt i | ƒ ˆ o t	 d ƒ n d  S(   Ni    s   >s   Press Enter when done editing:(
   s   lines   Nones   itplnss   run_templates   localss   cmds   oss   systems   waits	   raw_input(   s   selfs   files   lines   cmd(   s   run_templates   wait(    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   call_editor   s    
	s   editorN(   s   call_editors   ips   set_hook(   s   run_templates   waits   call_editor(    (   s   run_templates   waitsO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   install_editor   s    
 	s   komodoc         C   s   t  |  d d t ƒd S(   s    Activestate Komodo [Edit] s    -l $line "$file"s   waitN(   s   install_editors   exes   True(   s   exe(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   komodo)   s     s   scitec         C   s   t  |  d ƒ d S(   s    SciTE or Sc1 s    "$file" -goto:$lineN(   s   install_editors   exe(   s   exe(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   scite-   s     s	   notepad++c         C   s   t  |  d ƒ d S(   s/    Notepad++ http://notepad-plus.sourceforge.net s    -n$line "$file"N(   s   install_editors   exe(   s   exe(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   notepadplusplus1   s     s   jedc         C   s   t  |  d ƒ d S(   s&    JED, the lightweight emacsish editor s    +$line "$file"N(   s   install_editors   exe(   s   exe(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   jed5   s     c         C   sK   |  t j o, d k } t i i | i ƒ } | d }  n t |  d ƒ d S(   sh    Idle, the editor bundled with python
    
    Should be pretty smart about finding the executable.
    Ns   /idle.pys    "$file"(	   s   exes   Nones   idlelibs   oss   paths   dirnames   __file__s   ps   install_editor(   s   exes   idlelibs   p(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   idle9   s     	s   emacsc         C   s   t  |  d ƒ d  S(   Ns    +$line "$file"(   s   install_editors   exe(   s   exe(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   emacsG   s    s	   gnuclientc         C   s   t  |  d ƒ d  S(   Ns    -nw +$line "$file"(   s   install_editors   exe(   s   exe(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys	   gnuclientJ   s    s   cedt.exec         C   s   t  |  d ƒ d  S(   Ns    /L:$line "$file"(   s   install_editors   exe(   s   exe(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   crimson_editorM   s    s   katec         C   s   t  |  d ƒ d  S(   Ns    -u -l $line "$file"(   s   install_editors   exe(   s   exe(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   kateP   s    (   s   __doc__s   IPython.ipapis   IPythons   ipapis   gets   ips   IPython.Itpls   itplnss   oss   Falses   install_editors   komodos   scites   notepadpluspluss   jeds   Nones   idles   emacss	   gnuclients   crimson_editors   kate(   s	   gnuclients   scites   itplnss   ips   install_editors   idles   crimson_editors   emacss   jeds   komodos   IPythons   notepadpluspluss   oss   kate(    (    sO   /u/d/b/dbachman/=/lib/python2.3/site-packages/IPython/Extensions/ipy_editors.pys   ?   s   		