docs: def downloadarchive(self, project, targetfile, archiveformat = 'zip'):
          """Download all output files as a single archive:
  
          * *targetfile* - path for the new local file to be written
          * *archiveformat* - the format of the archive, can be 'zip','gz','bz2'
  
          Example::
  
              client.downloadarchive("myproject","allresults.zip","zip")
  
          """
          if isinstance(targetfile,str) or (sys.version < '3' and isinstance(targetfile,unicode)): #pylint: disable=undefined-variable
              targetfile = open(targetfile,'wb')
          r = requests.get(self.url + project + '/output/' + archiveformat,**self.initrequest())
          CHUNK = 16 * 1024
          for chunk in r.iter_content(chunk_size=CHUNK):
              if chunk: # filter out keep-alive new chunks
                  targetfile.write(chunk)
                  targetfile.flush()
          targetfile.close()