4 # Add ZIP library to search path in case of direct launch without py2exe
5 libraryZip
= os
.path
.join(os
.path
.dirname(sys
.argv
[0]), 'library.zip')
6 if os
.path
.exists(libraryZip
):
7 sys
.path
.append(libraryZip
)
9 assert (len(sys
.argv
) == 2) or (len(sys
.argv
) == 3), "Usage: download URL [If-Modified-Since-Date], not %s" % sys
.argv
10 if len(sys
.argv
) >= 3:
11 if_modified_since_date
= sys
.argv
[2]
13 if_modified_since_date
= None
15 # Don't convert linebreaks to Windows style since this would invalidate the GPG signatures
18 msvcrt
.setmode(1, os
.O_BINARY
)
20 from zeroinstall
.injector
import _download_child
21 _download_child
._download
_as
_child
(sys
.argv
[1], if_modified_since_date
)