MCPcopy Index your code
hub / github.com/rawpython/remi / dir_go_back

Method dir_go_back

remi/gui.py:3809–3818  ·  view source on GitHub ↗
(self, widget)

Source from the content-addressed store, hash-verified

3807 self.append(self.itemContainer, key='items') # replace the old widget
3808
3809 def dir_go_back(self, widget):
3810 curpath = os.getcwd() # backup the path
3811 try:
3812 os.chdir(self.pathEditor.get_text())
3813 os.chdir('..')
3814 self.chdir(os.getcwd())
3815 except Exception as e:
3816 self.pathEditor.set_text(self._last_valid_path)
3817 log.error('error changing directory', exc_info=True)
3818 os.chdir(curpath) # restore the path
3819
3820 def dir_go(self, widget):
3821 # when the GO button is pressed, it is supposed that the pathEditor is changed

Callers

nothing calls this directly

Calls 3

chdirMethod · 0.95
get_textMethod · 0.45
set_textMethod · 0.45

Tested by

no test coverage detected