futures3.

Attuazione futures in stile Java in Python 3.x
Scarica ora

futures3. Classifica e riepilogo

Annuncio pubblicitario

  • Rating:
  • Licenza:
  • BSD License
  • Prezzo:
  • FREE
  • Nome editore:
  • Brian Quinlan
  • Sito web dell'editore:

futures3. Tag


futures3. Descrizione

Attuazione futures in stile Java in Python 3.x Futures3 è un modulo che implementa i futures in stile Java per Python.esempio: "Scarica molti URL in parallelo." Importa Functoolsimport urllib.requestimport Futuresurls = DEF Load_url (URL, Timeout): ritorno urllib.request.urlopen (URL, Timeout = Timeout). Read () con futures.threadpoolexecutor (50) come esecutore: future_list = exetrour.run_to_futures () per URL, futuro in ZIP (URLS, FUTURE_LIST): se future.Exception () non è nessuno: stampa '% r generata un'eccezione:% s'% (URL, FUTURE.Exception ()) Else: Stampa '% r Pagina è% d Byte'% (URL, LEN (FUTURE.Result ())) Requisiti: · Python.


futures3. Software correlato

dflat.

Uno strumento di comando per lavorare con i file system DFFlat Digital Conservation ...

155

Scarica