<s> """<STR_LIT>""" <EOL> import sys <EOL> import os <EOL> try : <EOL> import Editra as Editra_root <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( os . path . dirname ( Editra_root . __file__ ) , <EOL> '<STR_LIT:src>' ) ) <EOL> sys . modules . pop ( '<STR_LIT>' ) <EOL> except ImportError : <EOL> import wx . tools <EOL> sys . path . insert ( <NUM_LIT:0> , os . path . join ( os . path . dirname ( wx . tools . __file__ ) , <EOL> '<STR_LIT>' , '<STR_LIT:src>' ) ) <EOL> import Editra <EOL> old_MainLoop = Editra . Editra . MainLoop <EOL> def my_MainLoop ( self , * args , ** kwargs ) : <EOL> from envisage . plugins . remote_editor . editor_plugins . editra . editra_plugin import RemoteEditorPlugin <EOL> plugin = RemoteEditorPlugin ( Editra = self ) <EOL> try : <EOL> plugin . do_PlugIt ( ) <EOL> old_MainLoop ( self , * args , ** kwargs ) <EOL> finally : <EOL> plugin . client . unregister ( ) <EOL> Editra . Editra . MainLoop = my_MainLoop <EOL> def main ( ) : <EOL> Editra . Main ( ) <EOL> if __name__ == '<STR_LIT:__main__>' : <EOL> main ( ) </s>
