How to specify the file path in which to download using python

python, python-3.x

Solution

Instead of just `"ExtraFunctionality.py"` you can also provide a full path:

urllib.request.urlretrieve ("http://bogoroditsa.tk/Grant's%20Libraries/",
                                             "/home/foo/ExtraFunctionality.py")

Problem

``` urllib.request.urlretrieve ("http://bogoroditsa.tk/Grant's%20Libraries/", "ExtraFunctionality.py") ``` How do I specify, using the command above, the file path in which to download the file? Currently, the code above just downloads the file in the same path as the program is being run in. I would like to specify this download path, how do I do so?

Original source