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
219e6398
Commit
219e6398
authored
Aug 11, 1998
by
Fred Drake
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added index entries.
Small markup nits.
parent
c8d8be8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
Doc/lib/libimp.tex
Doc/lib/libimp.tex
+8
-5
No files found.
Doc/lib/libimp.tex
View file @
219e6398
...
...
@@ -12,8 +12,9 @@ functions:
\begin{funcdesc}
{
get
_
magic
}{}
\indexii
{
file
}{
byte-code
}
Return the magic string value used to recognize byte-compiled code
files (
``
\code
{
.pyc
}
files''
). (This value may be different for each
files (
\file
{
.pyc
}
files
). (This value may be different for each
Python version.)
\end{funcdesc}
...
...
@@ -22,8 +23,8 @@ Return a list of triples, each describing a particular type of module.
Each triple has the form
\code
{
(
\var
{
suffix
}
,
\var
{
mode
}
,
\var
{
type
}
)
}
, where
\var
{
suffix
}
is a string to be appended to the
module name to form the filename to search for,
\var
{
mode
}
is the mode
string to pass to the built-in
\
code
{
open
}
function to open the fil
e
(this can be
\code
{
'r'
}
for text files or
\code
{
'rb'
}
for binary
string to pass to the built-in
\
function
{
open()
}
function to open th
e
file
(this can be
\code
{
'r'
}
for text files or
\code
{
'rb'
}
for binary
files), and
\var
{
type
}
is the file type, which has one of the values
\constant
{
PY
_
SOURCE
}
,
\constant
{
PY
_
COMPILED
}
, or
\constant
{
C
_
EXTENSION
}
, described below.
...
...
@@ -167,6 +168,7 @@ no such module.
\end{funcdesc}
\begin{funcdesc}
{
load
_
compiled
}{
name, pathname, file
}
\indexii
{
file
}{
byte-code
}
Load and initialize a module implemented as a byte-compiled code file
and return its module object. If the module was already initialized,
it will be initialized
\emph
{
again
}
. The
\var
{
name
}
argument is used
...
...
@@ -200,8 +202,9 @@ to the source file. The \var{file} argument is the source
file, open for reading as text, from the beginning.
It must currently be a real file
object, not a user-defined class emulating a file. Note that if a
properly matching byte-compiled file (with suffix
\file
{
.pyc
}
) exists,
it will be used instead of parsing the given source file.
properly matching byte-compiled file (with suffix
\file
{
.pyc
}
or
\file
{
.pyo
}
) exists, it will be used instead of parsing the given
source file.
\end{funcdesc}
...
...
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