Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 002f7aa

Browse files
committed
Note that no .pyc/.pyo files are created for script files.
1 parent f9cfb17 commit 002f7aa

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

Doc/tut/tut.tex

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1909,6 +1909,13 @@ \subsection{``Compiled'' Python files}
19091909
file; the only thing that's faster about \file{.pyc} or \file{.pyo}
19101910
files is the speed with which they are loaded.
19111911

1912+
\item
1913+
When a script is run by giving its name on the command line, the
1914+
bytecode for the script is never written to a \file{.pyc} or
1915+
\file{.pyo} file. Thus, the startup time of a script may be reduced
1916+
by moving most of its code to a module and having a small bootstrap
1917+
script that imports that module.
1918+
19121919
\item
19131920
It is possible to have a file called \file{spam.pyc} (or
19141921
\file{spam.pyo} when \code{-O} is used) without a module

0 commit comments

Comments
 (0)