py_ext/PythonFileCTNMixin.py
changeset 738 413946c04c87
parent 734 5c42cafaee15
child 1061 02f371f3e063
equal deleted inserted replaced
737:7b421e080636 738:413946c04c87
    12     
    12     
    13     EditorType = PythonEditor
    13     EditorType = PythonEditor
    14     
    14     
    15     def __init__(self):
    15     def __init__(self):
    16         
    16         
    17         self.ConfNodeMethods.insert(0, 
       
    18                 {"bitmap" : "editPYTHONcode",
       
    19                  "name" : _("Edit Python File"), 
       
    20                  "tooltip" : _("Edit Python File"),
       
    21                  "method" : "_OpenView"},
       
    22         )
       
    23 
       
    24         filepath = self.PythonFileName()
    17         filepath = self.PythonFileName()
    25         
    18         
    26         self.PythonCode = PythonClasses["Python"]()
    19         self.PythonCode = PythonClasses["Python"]()
    27         if os.path.isfile(filepath):
    20         if os.path.isfile(filepath):
    28             xmlfile = open(filepath, 'r')
    21             xmlfile = open(filepath, 'r')