Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
b789c70d
Kaydet (Commit)
b789c70d
authored
Nis 02, 1998
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Minor markup nits.
üst
f14e2f8a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
20 deletions
+24
-20
ext.tex
Doc/ext.tex
+12
-10
ext.tex
Doc/ext/ext.tex
+12
-10
No files found.
Doc/ext.tex
Dosyayı görüntüle @
b789c70d
...
...
@@ -1309,9 +1309,11 @@ otherwise you have to select it as a build option (see below). Once
configured, dynamic loading is trivial to use: when a Python program
executes
\code
{
import spam
}
, the search for modules tries to find a
file
\file
{
spammodule.o
}
(
\file
{
spammodule.so
}
when using shared
libraries) in the module search path, and if one is found, it is
loaded into the executing binary and executed. Once loaded, the
module acts just like a built-in extension module.
libraries) in the module search path,
%
\indexiii
{
module
}{
search
}{
path
}
and if one is found, it is loaded into the executing binary and
executed. Once loaded, the module acts just like a built-in extension
module.
The advantages of dynamic loading are twofold: the ``core'' Python
binary gets smaller, and users can extend Python with their own
...
...
@@ -1411,10 +1413,10 @@ described earlier).
Note that in all cases you will have to create your own Makefile that
compiles your module file(s). This Makefile will have to pass two
\samp
{
-I
}
arguments to the
\C
{}
compiler which will make it find the
Python header files. If the Make variable
\var
{
PYTHONTOP
}
points to
the toplevel Python directory, your
\var
{
CFLAGS
}
Make variable should
Python header files. If the Make variable
\
make
var
{
PYTHONTOP
}
points to
the toplevel Python directory, your
\
make
var
{
CFLAGS
}
Make variable should
contain the options
\samp
{
-I
\$
(PYTHONTOP) -I
\$
(PYTHONTOP)/Include
}
.
(Most header files are in the
\file
{
Include
}
subdirectory, but the
(Most header files are in the
\file
{
Include
/
}
subdirectory, but the
\file
{
config.h
}
header lives in the toplevel directory.)
...
...
@@ -1461,7 +1463,8 @@ additional \C{} flag \samp{-G0} (or \samp{-G 0}). This instructs the
assembler to generate position-independent code.
You don't need to link the resulting
\file
{
spammodule.o
}
file; just
copy it into a directory along the Python module search path.
copy it into a directory along the Python module search path.
%
\indexiii
{
module
}{
search
}{
path
}
The first time your extension is loaded, it takes some extra time and
a few messages may be printed. This creates a file
...
...
@@ -1486,7 +1489,8 @@ normally only \samp{-l} options or absolute pathnames of libraries
\label
{
gnuLinking
}
Just copy
\file
{
spammodule.o
}
into a directory along the Python module
search path.
search path.
%
\indexiii
{
module
}{
search
}{
path
}
If your extension modules uses additional system libraries, you must
create a file
\file
{
spammodule.libs
}
in the same directory as the
...
...
@@ -1495,6 +1499,4 @@ whitespace-separated absolute pathnames of libraries (\samp{.a}
files). No
\samp
{
-l
}
options can be used.
\input
{
ext.ind
}
\end{document}
Doc/ext/ext.tex
Dosyayı görüntüle @
b789c70d
...
...
@@ -1309,9 +1309,11 @@ otherwise you have to select it as a build option (see below). Once
configured, dynamic loading is trivial to use: when a Python program
executes
\code
{
import spam
}
, the search for modules tries to find a
file
\file
{
spammodule.o
}
(
\file
{
spammodule.so
}
when using shared
libraries) in the module search path, and if one is found, it is
loaded into the executing binary and executed. Once loaded, the
module acts just like a built-in extension module.
libraries) in the module search path,
%
\indexiii
{
module
}{
search
}{
path
}
and if one is found, it is loaded into the executing binary and
executed. Once loaded, the module acts just like a built-in extension
module.
The advantages of dynamic loading are twofold: the ``core'' Python
binary gets smaller, and users can extend Python with their own
...
...
@@ -1411,10 +1413,10 @@ described earlier).
Note that in all cases you will have to create your own Makefile that
compiles your module file(s). This Makefile will have to pass two
\samp
{
-I
}
arguments to the
\C
{}
compiler which will make it find the
Python header files. If the Make variable
\var
{
PYTHONTOP
}
points to
the toplevel Python directory, your
\var
{
CFLAGS
}
Make variable should
Python header files. If the Make variable
\
make
var
{
PYTHONTOP
}
points to
the toplevel Python directory, your
\
make
var
{
CFLAGS
}
Make variable should
contain the options
\samp
{
-I
\$
(PYTHONTOP) -I
\$
(PYTHONTOP)/Include
}
.
(Most header files are in the
\file
{
Include
}
subdirectory, but the
(Most header files are in the
\file
{
Include
/
}
subdirectory, but the
\file
{
config.h
}
header lives in the toplevel directory.)
...
...
@@ -1461,7 +1463,8 @@ additional \C{} flag \samp{-G0} (or \samp{-G 0}). This instructs the
assembler to generate position-independent code.
You don't need to link the resulting
\file
{
spammodule.o
}
file; just
copy it into a directory along the Python module search path.
copy it into a directory along the Python module search path.
%
\indexiii
{
module
}{
search
}{
path
}
The first time your extension is loaded, it takes some extra time and
a few messages may be printed. This creates a file
...
...
@@ -1486,7 +1489,8 @@ normally only \samp{-l} options or absolute pathnames of libraries
\label
{
gnuLinking
}
Just copy
\file
{
spammodule.o
}
into a directory along the Python module
search path.
search path.
%
\indexiii
{
module
}{
search
}{
path
}
If your extension modules uses additional system libraries, you must
create a file
\file
{
spammodule.libs
}
in the same directory as the
...
...
@@ -1495,6 +1499,4 @@ whitespace-separated absolute pathnames of libraries (\samp{.a}
files). No
\samp
{
-l
}
options can be used.
\input
{
ext.ind
}
\end{document}
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