bash - How to download files from a python program -


i'm trying make minecraft installer program in python. currently, i've got bash script call subprocess download files wget, works on linux. there platform-independant python library downloading files? thanks, martin

there lot of python library can that: urllib, urllib2, requests.

for instance requests:

import requests response = requests.get('http://www.example.com/file') 

you may need install requests pip or package manager. using pip:

pip install requests 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -