Ñò
*mÝUc
@ s‚ d Z d d k l Z d d k Z d d k Z d d k Z d d k Z d d k l Z d d d g Z
d Z d e f d „ ƒ YZ
d
„ Z d „ Z d „ Z d
„ Z d d d „ Z d „ Z d „ Z e d j o« d d k Z e i ƒ Z e i ƒ Z e i d ƒ Z e i d e ƒ e i d ƒ Z e i d e ƒ e i d d e d d ƒe i d d e ƒe i! ƒ Z" e" i e" ƒ n d S( s, Tools for invoking editors programmatically.iÿÿÿÿ( t print_functionN( t find_executablet editt
get_editort EditorErrors 0.4c B s e Z RS( ( t __name__t
__module__( ( ( s7 /opt/alt/python37/lib/python3.7/site-packages/editor.pyR s c C s
d d d g S( Nt vimt emacst nano( ( ( ( s7 /opt/alt/python37/lib/python3.7/site-packages/editor.pyt get_default_editors s c C sP | d j o d S| d j o d S| d j o d S| d j o d Sd
Sd S( NR t gvims -f -oR s -nwt gedits -w --new-windowR s -Rt ( s vimR ( ( t editor( ( s7 /opt/alt/python37/lib/python3.7/site-packages/editor.pyt get_editor_args# s
c C s d S( Ns $EDITOR( ( ( ( s7 /opt/alt/python37/lib/python3.7/site-packages/editor.pyt get_platform_editor_var4 s c C sz t i i d ƒ p t i i d ƒ } | o | Sx/ t ƒ D]$ } t | ƒ } | d j o | Sq; Wt d t ƒ ƒ ‚ d S( Nt VISUALt EDITORsV Unable to find a viable editor on this system.Please consider setting your %s variable( t ost environt getR
R t NoneR R ( R t edt path( ( s7 /opt/alt/python37/lib/python3.7/site-packages/editor.pyR 9 s %
c C s t ƒ } t t i i | ƒ ƒ } | g | i d ƒ } | d j o t i ƒ } | i } n | d j o@ t
| d d ƒi i ƒ } z | ~ } | i
| ƒ Wd QXn | | g 7} t i | d t ƒ} | i ƒ t
| d d ƒi i ƒ } z | ~ } | i ƒ SWd QXd S( Nt t modet wbt close_fdst rb( R R R R t basenamet splitR t tempfilet NamedTemporaryFilet namet opent __exit__t __enter__t writet
subprocesst Popent Truet communicatet read( t filenamet contentsR t argst tmpt _[1]t ft proct _[2]( ( s7 /opt/alt/python37/lib/python3.7/site-packages/editor.pyR I s
)
)c C s t t ƒ ƒ d S( N( t printR ( t ns( ( s7 /opt/alt/python37/lib/python3.7/site-packages/editor.pyt _get_editor_ s c C sO | i } | d j o | i t i ƒ ƒ } n t t d | i d | ƒ ƒ d S( NR, R- ( R- R t encodet localet getpreferredencodingR4 R R ( R5 R- ( ( s7 /opt/alt/python37/lib/python3.7/site-packages/editor.pyt _editc s
t __main__s
get-editort cmdR t typet nargst ?s
--contents(# t __doc__t
__future__R R8 t os.pathR R' R t distutils.spawnR t __all__t __version__t RuntimeErrorR R
R R R R R R6 R: R t argparset ArgumentParsert apt add_subparserst spt
add_parserR<