urllib2 POST progress monitoring

后端 未结 4 596
自闭症患者
自闭症患者 2020-12-13 16:14

I\'m uploading a fairly large file with urllib2 to a server-side script via POST. I want to display a progress indicator that shows the current upload progress. Is there a h

4条回答
  •  夕颜
    夕颜 (楼主)
    2020-12-13 16:50

    requests 2.0.0 has streaming uploads. This means you can use a generator to yield tiny chunks and print the progress between chunks.

提交回复
热议问题