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
9171bed6
Kaydet (Commit)
9171bed6
authored
May 26, 2008
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
take Brett's advice on a few warnings
üst
4036fd4b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
commands.rst
Doc/library/commands.rst
+7
-6
commands.py
Lib/commands.py
+2
-2
No files found.
Doc/library/commands.rst
Dosyayı görüntüle @
9171bed6
...
@@ -16,6 +16,12 @@ The :mod:`subprocess` module provides more powerful facilities for spawning new
...
@@ -16,6 +16,12 @@ The :mod:`subprocess` module provides more powerful facilities for spawning new
processes and retrieving their results. Using the :mod:`subprocess` module is
processes and retrieving their results. Using the :mod:`subprocess` module is
preferable to using the :mod:`commands` module.
preferable to using the :mod:`commands` module.
.. warning::
In 3.x, :func:`getstatus` and two undocumented functions (:func:`mk2arg` and
:func:`mkarg`) have been removed. Also, :func:`getstatusoutput` and
:func:`getoutput` have been moved to the :mod:`subprocess` module.
The :mod:`commands` module defines the following functions:
The :mod:`commands` module defines the following functions:
...
@@ -42,12 +48,7 @@ The :mod:`commands` module defines the following functions:
...
@@ -42,12 +48,7 @@ The :mod:`commands` module defines the following functions:
.. deprecated:: 2.6
.. deprecated:: 2.6
This function is nonobvious and useless, also the name is misleading in the
This function is nonobvious and useless, also the name is misleading in the
presence of :func:`getstatusoutput`. It is removed in 3.x.
presence of :func:`getstatusoutput`.
.. warning::
Two undocumented functions in this module, :func:`mk2arg` and :func:`mkargs`
are removed in 3.x.
Example::
Example::
...
...
Lib/commands.py
Dosyayı görüntüle @
9171bed6
...
@@ -64,7 +64,7 @@ def getstatusoutput(cmd):
...
@@ -64,7 +64,7 @@ def getstatusoutput(cmd):
#
#
def
mk2arg
(
head
,
x
):
def
mk2arg
(
head
,
x
):
from
warnings
import
warnpy3k
from
warnings
import
warnpy3k
warnpy3k
(
"In 3.x, mk2arg
is
removed."
)
warnpy3k
(
"In 3.x, mk2arg
has been
removed."
)
import
os
import
os
return
mkarg
(
os
.
path
.
join
(
head
,
x
))
return
mkarg
(
os
.
path
.
join
(
head
,
x
))
...
@@ -78,7 +78,7 @@ def mk2arg(head, x):
...
@@ -78,7 +78,7 @@ def mk2arg(head, x):
#
#
def
mkarg
(
x
):
def
mkarg
(
x
):
from
warnings
import
warnpy3k
from
warnings
import
warnpy3k
warnpy3k
(
"in 3.x, mkarg
is remove
."
)
warnpy3k
(
"in 3.x, mkarg
has been removed
."
)
if
'
\'
'
not
in
x
:
if
'
\'
'
not
in
x
:
return
'
\'
'
+
x
+
'
\'
'
return
'
\'
'
+
x
+
'
\'
'
s
=
' "'
s
=
' "'
...
...
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