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
0c44c047
Kaydet (Commit)
0c44c047
authored
Şub 24, 2003
tarafından
Jack Jansen
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
sys.executable can contain spaces, cater for this when passing it to
os.popen(). Fixes #692222.
üst
9ce623fc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
test_atexit.py
Lib/test/test_atexit.py
+2
-2
test_popen.py
Lib/test/test_popen.py
+1
-1
No files found.
Lib/test/test_atexit.py
Dosyayı görüntüle @
0c44c047
...
...
@@ -27,7 +27,7 @@ f = file(fname, "w")
f
.
write
(
input
)
f
.
close
()
p
=
popen
(
"
%
s
%
s"
%
(
executable
,
fname
))
p
=
popen
(
'"
%
s"
%
s'
%
(
executable
,
fname
))
output
=
p
.
read
()
p
.
close
()
vereq
(
output
,
"""
\
...
...
@@ -55,7 +55,7 @@ f = file(fname, "w")
f
.
write
(
input
)
f
.
close
()
p
=
popen
(
"
%
s
%
s"
%
(
executable
,
fname
))
p
=
popen
(
'"
%
s"
%
s'
%
(
executable
,
fname
))
output
=
p
.
read
()
p
.
close
()
vereq
(
output
,
"""
\
...
...
Lib/test/test_popen.py
Dosyayı görüntüle @
0c44c047
...
...
@@ -15,7 +15,7 @@ from os import popen
# This results in Python being spawned and printing the sys.argv list.
# We can then eval() the result of this, and see what each argv was.
def
_do_test_commandline
(
cmdline
,
expected
):
cmd
=
'
%
s
-c "import sys;print sys.argv"
%
s'
%
(
sys
.
executable
,
cmdline
)
cmd
=
'
"
%
s"
-c "import sys;print sys.argv"
%
s'
%
(
sys
.
executable
,
cmdline
)
data
=
popen
(
cmd
)
.
read
()
got
=
eval
(
data
)[
1
:]
# strip off argv[0]
if
got
!=
expected
:
...
...
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