class_docstr: Example TreeItem subclass -- browse the file system.
class_docstr_tok: ["Example","TreeItem","subclass","--","browse","the","file","system","."]
code: def SetText(self, text):
      newpath = os.path.dirname(self.path)
      newpath = os.path.join(newpath, text)
      if os.path.dirname(newpath) != os.path.dirname(self.path):
          return
      try:
          os.rename(self.path, newpath)
          self.path = newpath
      except OSError:
          pass
  
imports: import os
  from tkinter import *
  from tkinter.ttk import Frame, Scrollbar
  from idlelib.config import idleConf
  from idlelib import zoomheight
label_desc: Use image node_id 4 for calling the FileTreeItem obj's underlying member method code with example usage: obj.SetText(text) without return types