File: urlretrieve.py

package info (click to toggle)
libtcod 1.18.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 5,464 kB
  • sloc: ansic: 48,535; cpp: 11,905; python: 4,840; makefile: 44; sh: 25
file content (18 lines) | stat: -rw-r--r-- 408 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#!/usr/bin/env python
"""
    This script is used as a workaround to a bug in SCons.

    https://github.com/SCons/scons/issues/3136

    urlretrieve must be called from a seperate Python process on some
    platforms.
"""
import sys

try:
    from urllib.request import urlretrieve
except ImportError: # Python 2
    from urllib import urlretrieve

if __name__ == '__main__':
    urlretrieve(*sys.argv[1:])