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
0ba7e595
Kaydet (Commit)
0ba7e595
authored
May 14, 1997
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
More rational implementation of get_qualified_path() -- search along
sys.path instead of assuming __file__ works.
üst
e61093c2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
12 deletions
+5
-12
test_imageop.py
Lib/test/test_imageop.py
+5
-12
No files found.
Lib/test/test_imageop.py
Dosyayı görüntüle @
0ba7e595
...
@@ -152,20 +152,13 @@ def getimage(name):
...
@@ -152,20 +152,13 @@ def getimage(name):
return
(
image
,
sizes
[
0
],
sizes
[
1
])
return
(
image
,
sizes
[
0
],
sizes
[
1
])
def
get_qualified_path
(
name
):
def
get_qualified_path
(
name
):
""" return a more qualified path to name
contructed from argv[1]
"""
""" return a more qualified path to name"""
import
sys
import
sys
import
os
import
os
import
string
for
dir
in
sys
.
path
:
fullname
=
os
.
path
.
join
(
dir
,
name
)
# get a more qualified path component of the script...
if
os
.
path
.
exists
(
fullname
):
if
__name__
==
'__main__'
:
return
fullname
ourname
=
sys
.
argv
[
0
]
else
:
# ...or the full path of the module
ourname
=
sys
.
modules
[
__name__
]
.
__file__
parts
=
string
.
splitfields
(
ourname
,
os
.
sep
)
parts
[
-
1
]
=
name
name
=
string
.
joinfields
(
parts
,
os
.
sep
)
return
name
return
name
# rgbimg (unlike imgfile) is portable to platforms other than SGI.
# rgbimg (unlike imgfile) is portable to platforms other than SGI.
...
...
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