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
90a72f8d
Kaydet (Commit)
90a72f8d
authored
Nis 10, 2001
tarafından
Fred Drake
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add documentation for getmoduleinfo() and getmodulename().
üst
75ebb29f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
libinspect.tex
Doc/lib/libinspect.tex
+23
-0
No files found.
Doc/lib/libinspect.tex
Dosyayı görüntüle @
90a72f8d
...
...
@@ -93,6 +93,29 @@ you can expect to find the following special attributes:
only members for which the predicate returns a true value are included.
\end{funcdesc}
\begin{funcdesc}
{
getmoduleinfo
}{
path
}
Return a tuple of values that describe how Python will interpret the
file identified by
\var
{
path
}
if it is a module, or
\code
{
None
}
if
it would not be identified as a module. The return tuple is
\code
{
(
\var
{
name
}
,
\var
{
suffix
}
,
\var
{
mode
}
,
\var
{
mtype
}
)
}
, where
\var
{
name
}
is the name of the module without the name of any
enclosing package,
\var
{
suffix
}
is the trailing part of the file
name (which may not be a dot-delimited extension),
\var
{
mode
}
is the
\function
{
open()
}
mode that would be used (
\code
{
'r'
}
or
\code
{
'rb'
}
), and
\var
{
mtype
}
is an integer giving the type of the
module.
\var
{
mtype
}
will have a value which can be compared to the
constants defined in the
\refmodule
{
imp
}
module; see the
documentation for that module for more information on module types.
\end{funcdesc}
\begin{funcdesc}
{
getmodulename
}{
path
}
Return the name of the module named by the file
\var
{
path
}
, without
including the names of enclosing packages. This uses the same
algortihm as the interpreter uses when searching for modules. If
the name cannot be matched according to the interpreter's rules,
\code
{
None
}
is returned.
\end{funcdesc}
\begin{funcdesc}
{
ismodule
}{
object
}
Return true if the object is a module.
\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