]> granicus.if.org Git - python/commitdiff
Note that no .pyc/.pyo files are created for script files.
authorGuido van Rossum <guido@python.org>
Sun, 28 Jun 1998 19:16:38 +0000 (19:16 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 28 Jun 1998 19:16:38 +0000 (19:16 +0000)
Doc/tut/tut.tex

index a13c939b6e59fb19583ffaedcf5102922c0a908c..4d9bf71e21d1b5054ec72290cff0f57d5bb8f1a3 100644 (file)
@@ -1909,6 +1909,13 @@ A program doesn't run any faster when it is read from a
 file; the only thing that's faster about \file{.pyc} or \file{.pyo}
 files is the speed with which they are loaded.
 
+\item
+When a script is run by giving its name on the command line, the
+bytecode for the script is never written to a \file{.pyc} or
+\file{.pyo} file.  Thus, the startup time of a script may be reduced
+by moving most of its code to a module and having a small bootstrap
+script that imports that module.
+
 \item
 It is possible to have a file called \file{spam.pyc} (or
 \file{spam.pyo} when \code{-O} is used) without a module