def populate_shell_combo(self): """Read the /etc/shells and looks for installed shells to fill the default_shell combobox. """ cb = self.get_widget('default_shell') # append user shell as first option cb.append_text(USER_SHELL_VALUE) if os.path.exists(SHELLS_FILE): lines = open(SHELLS_FILE).readlines() for i in lines: possible = i.strip() if possible and not possible.startswith('#') and os.path.exists(possible): cb.append_text(possible) for i in get_binaries_from_path(PYTHONS): cb.append_text(i)
def populate_shell_combo(self): """Read the /etc/shells and looks for installed shells to fill the default_shell combobox. """ cb = self.get_widget('default_shell') # append user shell as first option cb.append_text(USER_SHELL_VALUE) if os.path.exists(SHELLS_FILE): lines = open(SHELLS_FILE).readlines() for i in lines: possible = i.strip() if possible and not possible.startswith('#') and os.path.exists(possible): cb.append_text(possible) for i in get_binaries_from_path(PYTHONS): cb.append_text(i)