code: def _save_pys(self, filepath):
          
  
          try:
              with Bz2AOpen(filepath, "wb",
                            main_window=self.main_window) as outfile:
                  interface = Pys(self.grid.code_array, outfile)
                  interface.from_code_array()
  
          except (IOError, ValueError), err:
              try:
                  post_command_event(self.main_window, self.StatusBarMsg,
                                     text=err)
                  return
              except TypeError:
                  # The main window does not exist any more
                  pass
  
          return not outfile.aborted
docs: Saves file as pys file and returns True if save success
  
          Parameters
          ----------
  
          filepath: String
          \tTarget file path for xls file