Also, one shouldn’t ignore the practical advantages of a batteries-included language (like Python) for enabling you to do things.
For example, if one wants to do some transformation of a spreadsheet which might be tricky or annoying to do in Excel/LibreOffice, one can just import csv and you’ve got a complete CSV file reader. Similarly, it’s an import and 2 function calls to get a file off the internet.
Similarly, it’s an import and 2 function calls to get a file off the internet.
I only count one function call:
import requests
f = requests.get(my_url).text
The built-in urllib and urllib2 modules can do this too, but they’re a disaster that should be buried in the ground. The general consensus is that requests is the Right Thing. You have to install it, but that should be easy with the pip package manager:
$ pip install requests
By the way, I agree with the recommendation of Python. It’s a very easy language to get started with, and it’s practical for all sorts of things. YouTube, for example, is mostly written in Python.
Also, one shouldn’t ignore the practical advantages of a batteries-included language (like Python) for enabling you to do things.
For example, if one wants to do some transformation of a spreadsheet which might be tricky or annoying to do in Excel/LibreOffice, one can just
import csv
and you’ve got a complete CSV file reader. Similarly, it’s animport
and 2 function calls to get a file off the internet.I only count one function call:
The built-in urllib and urllib2 modules can do this too, but they’re a disaster that should be buried in the ground. The general consensus is that requests is the Right Thing. You have to install it, but that should be easy with the pip package manager:
By the way, I agree with the recommendation of Python. It’s a very easy language to get started with, and it’s practical for all sorts of things. YouTube, for example, is mostly written in Python.
Thanks for requests!