Rev 9382 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 9382 | Rev 9384 | ||
---|---|---|---|
Line 1... | Line 1... | ||
1 | import os |
1 | import os |
2 | import urllib.request |
2 | import urllib.request |
3 | from .logging import log |
3 | from .logging import log |
Line 4... | Line 4... | ||
4 | 4 | ||
- | 5 | def download(link, path, skip_exist = False): |
|
- | 6 | if skip_exist and os.path.exists(path): |
|
5 | def download(link, path): |
7 | return |
6 | log(f"Downloading {path}... ", end = "") |
8 | log(f"Downloading {path}... ", end = "") |
7 | urllib.request.urlretrieve(link, path) |
9 | urllib.request.urlretrieve(link, path) |
Line 8... | Line -... | ||
8 | log("Done.") |
- | |
9 | - | ||
10 | def download_if_not_exist(link, path): |
- | |
11 | if not os.path.exists(path): |
- |