Lines Matching +full:python +full:- +full:pathlib
3 import pathlib
12 # The __main__.py used if the users specifies "-m module:fn".
13 # Note that this will always be written as UTF-8 (module and
14 # function names can be non-ASCII in Python 3).
15 # We add a coding cookie even though UTF-8 is the default in Python 3
16 # because the resulting archive may be intended to be run under Python 2.
18 # -*- coding: utf-8 -*-
24 # The Windows launcher defaults to UTF-8 when parsing shebang lines if the
25 # file has no BOM. So use UTF-8 on Windows.
28 shebang_encoding = 'utf-8'
80 The SOURCE can be the name of a directory, or a filename or a file-like
84 which can be a filename or a file-like object. If SOURCE is a directory,
101 source = pathlib.Path(source)
132 target = pathlib.Path(target)
144 z.writestr('__main__.py', main_py.encode('utf-8'))
166 parser.add_argument('--output', '-o', default=None,
169 parser.add_argument('--python', '-p', default=None,
170 help="The name of the Python interpreter to use "
172 parser.add_argument('--main', '-m', default=None,
175 parser.add_argument('--compress', '-c', action='store_true',
178 parser.add_argument('--info', default=False, action='store_true',
185 # Handle `python -m zipapp archive.pyz --info`.
196 raise SystemExit("In-place editing of archives is not supported")
201 interpreter=args.python, main=args.main,