Create New Item
Item Type
File
Folder
Item Name
Search file in folder and subfolders...
Are you sure want to rename?
File Manager
/
admin
/
installer
/
css
/
sass
/
sym404
/
root
/
usr
/
share
/
doc
/
python3-pycurl
/
examples
/
quickstart
:
write_file.py
Advanced Search
Upload
New Item
Settings
Back
Back Up
Advanced Editor
Save
#! /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()