• Home
  • Raw
  • Download

Lines Matching refs:archive

26 can be used to create an executable archive from a directory containing
27 Python code. When run, the archive will execute the ``main`` function from
28 the module ``myapp`` in the archive.
48 If *source* is a directory, this will create an archive from the contents of
49 *source*. If *source* is a file, it should be an archive, and it will be
50 copied to the target archive (or the contents of its shebang line will be
64 An output filename must be specified if the *source* is an archive (and in
69 Add a ``#!`` line to the archive specifying *interpreter* as the command
70 to run. Also, on POSIX, make the archive executable. The default is to
75 Write a ``__main__.py`` file to the archive that executes *mainfn*. The
77 package/module in the archive, and "fn" is a callable in the given module.
80 :option:`--main` cannot be specified when copying an archive.
85 file. By default, files are stored uncompressed in the archive.
87 :option:`--compress` has no effect when copying an archive.
93 Display the interpreter embedded in the archive, for diagnostic purposes. In
94 this case, any other options are ignored and SOURCE must be an archive, not a
112 Create an application archive from *source*. The source can be any
116 to a directory, in which case a new application archive will be
118 * The name of an existing application archive file, or a :term:`path-like object`
123 file should be an application archive, and the file object is
124 assumed to be positioned at the start of the archive.
126 The *target* argument determines where the resulting archive will be
130 the archive will be written to that file.
131 * If it is an open file object, the archive will be written to that
138 interpreter with which the archive will be executed. It is written as
139 a "shebang" line at the start of the archive. On POSIX, this will be
146 used as the main program for the archive. It can only be specified if
149 "pkg.module:callable" and the archive will be run by importing
152 contain a ``__main__.py`` file, as otherwise the resulting archive
161 compressed. If set to ``True``, files in the archive are compressed
163 This argument has no effect when copying an existing archive.
168 When copying an existing archive, file objects supplied only need
170 archive from a directory, if the target is a file object it will be
177 .. function:: get_interpreter(archive)
180 archive. If there is no ``#!`` line, return :const:`None`.
181 The *archive* argument can be a filename or a file-like object open
182 for reading in bytes mode. It is assumed to be at the start of the archive.
190 Pack up a directory into an archive, and run it.
212 To replace the shebang line on an existing archive, create a modified archive
222 production code should do so. Also, this method will only work if the archive
239 archive, you need to ensure that the interpreter used is portable. The Python
264 is to bundle all of the application's dependencies into the archive, along
267 The steps to create a standalone archive are as follows:
421 since version 2.6. In order to be executed by Python, an application archive
443 If an application archive has a shebang line, it may have the executable bit set