def _save(self, stateName, path):
print('<STR_LIT>')<EOL>state = {'<STR_LIT>': dict(self.opts),<EOL>'<STR_LIT>': self.dialogs.saveState()}<EOL>self.sigSave.emit(state)<EOL>self.saveThread.prepare(stateName, path, self.tmp_dir_session, state)<EOL>self.saveThread.start()<EOL>self.current_session = stateName<EOL>r = self.opts['<STR_LIT>']<EOL>try:<EOL><INDENT>r.pop(r.index(path))<EOL><DEDENT>except ValueError:<EOL><INDENT>pass<EOL><DEDENT>r.insert(<NUM_LIT:0>, path)<EOL>
save into 'stateName' to pyz-path