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
aa0b33f9
Commit
aa0b33f9
authored
Dec 04, 2001
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update docs to reflect new compile() and compileFile()
parent
2d3a353b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
3 deletions
+18
-3
Doc/lib/compiler.tex
Doc/lib/compiler.tex
+18
-3
No files found.
Doc/lib/compiler.tex
View file @
aa0b33f9
...
...
@@ -57,9 +57,24 @@ appropriate method on the \var{visitor} instance for each node
encountered.
\end{funcdesc}
\begin{funcdesc}
{
compile
}{
path
}
Compile the file
\var
{
path
}
and generate the corresponding
\file
{
.pyc
}
file.
\begin{funcdesc}
{
compile
}{
source, filename, mode, flags=None,
dont
_
inherit=None
}
Compile the string
\var
{
source
}
, a Python module, statement or
expression, into a code object that can be executed by the exec
statement or
\function
{
eval()
}
. This function is a replacement for the
built-in
\function
{
compile()
}
function.
The
\var
{
filename
}
will be used for run-time error messages.
The
\var
{
mode
}
must be 'exec' to compile a module, 'single' to compile a
single (interactive) statement, or 'eval' to compile an expression.
The
\var
{
flags
}
and
\var
{
dont
_
inherit
}
arguments affect future-related
statements, but are not supported yet.
\end{funcdesc}
\begin{funcdesc}
{
compileFile
}{
source
}
Compiles the file
\var
{
source
}
and generates a .pyc file.
\end{funcdesc}
The
\module
{
compiler
}
package contains the following modules:
...
...
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