<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def get_script_str(self, reset=True):
 """Returns a string with the script and reset the editor if reset is True"""

        s = "\n".join(l for l in self._lines)
        if reset:
            self.reset()
        return s