Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
4756bb3e
Commit
4756bb3e
authored
Aug 11, 1998
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Documentation for the py_compile module.
parent
64c105d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
0 deletions
+35
-0
Doc/lib/libpycompile.tex
Doc/lib/libpycompile.tex
+35
-0
No files found.
Doc/lib/libpycompile.tex
0 → 100644
View file @
4756bb3e
% Documentation based on module docstrings, by Fred L. Drake, Jr.
% <fdrake@acm.org>
\section
{
\module
{
py
_
compile
}
---
Compile Python source files.
}
\declaremodule
[pycompile]
{
standard
}{
py
_
compile
}
\modulesynopsis
{
Compile Python source files to byte-code files.
}
\indexii
{
file
}{
byte-code
}
The
\module
{
py
_
compile
}
module provides a single function to generate
a byte-code file from a source file.
Though not often needed, this function can be useful when installing
modules for shared use, especially if some of the users may not have
permission to write the byte-code cache files in the directory
containing the source code.
\begin{funcdesc}
{
compile
}{
file
\optional
{
, cfile
\optional
{
, dfile
}}}
Compile a source file to byte-code and write out the byte-code cache
file. The source code is loaded from the file name
\var
{
file
}
. The
byte-code is written to
\var
{
cfile
}
, which defaults to
\var
{
file
}
\code
{
+
}
\code
{
'c'
}
(
\code
{
'o'
}
if optimization is enabled in the
current interpreter). If
\var
{
dfile
}
is specified, it is used as
the name of the source file in error messages instead of
\var
{
file
}
.
\end{funcdesc}
\begin{seealso}
\seemodule
{
compileall
}{
Utilities to compile all Python source files
in a directory tree.
}
\end{seealso}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment