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
208b00d0
Kaydet (Commit)
208b00d0
authored
Nis 25, 2009
tarafından
Georg Brandl
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
#5841: add deprecation py3k warning and notice in the docs for commands module.
üst
cf5608df
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
4 deletions
+10
-4
commands.rst
Doc/library/commands.rst
+6
-0
commands.py
Lib/commands.py
+4
-4
No files found.
Doc/library/commands.rst
Dosyayı görüntüle @
208b00d0
...
...
@@ -5,6 +5,12 @@
.. module:: commands
:platform: Unix
:synopsis: Utility functions for running external commands.
:deprecated:
.. deprecated:: 2.6
The :mod:`commands` module has been removed in Python 3.0. Use the
:mod:`subprocess` module instead.
.. sectionauthor:: Sue Williams <sbw@provis.com>
...
...
Lib/commands.py
Dosyayı görüntüle @
208b00d0
...
...
@@ -18,6 +18,10 @@ Encapsulates the basic operation:
[Note: it would be nice to add functions to interpret the exit status.]
"""
from
warnings
import
warnpy3k
warnpy3k
(
"the commands module has been removed in Python 3.0; "
"use the subprocess module instead"
,
stacklevel
=
2
)
del
warnpy3k
__all__
=
[
"getstatusoutput"
,
"getoutput"
,
"getstatus"
]
...
...
@@ -63,8 +67,6 @@ def getstatusoutput(cmd):
# Make command argument from directory and pathname (prefix space, add quotes).
#
def
mk2arg
(
head
,
x
):
from
warnings
import
warnpy3k
warnpy3k
(
"In 3.x, mk2arg has been removed."
)
import
os
return
mkarg
(
os
.
path
.
join
(
head
,
x
))
...
...
@@ -77,8 +79,6 @@ def mk2arg(head, x):
# with backslash.
#
def
mkarg
(
x
):
from
warnings
import
warnpy3k
warnpy3k
(
"in 3.x, mkarg has been removed."
)
if
'
\'
'
not
in
x
:
return
'
\'
'
+
x
+
'
\'
'
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