/
/
opt
/
hc_python
/
share
/
doc
/
pycurl
/
examples
/
quickstart
Server: server63.web-hosting.com (198.54.116.184)
You: 216.73.216.187
PHP 7.4.33
Dir:
/opt/hc_python/share/doc/pycurl/examples/quickstart
Edit:
/opt/hc_python/share/doc/pycurl/examples/quickstart/write_file.py
#! /usr/bin/env python # -*- coding: utf-8 -*- # vi:ts=4:et import pycurl # As long as the file is opened in binary mode, both Python 2 and Python 3 # can write response body to it without decoding. with open('out.html', 'wb') as f: c = pycurl.Curl() c.setopt(c.URL, 'http://pycurl.io/') c.setopt(c.WRITEDATA, f) c.perform() c.close()
Ukuran: 357 B