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
f717f050
Kaydet (Commit)
f717f050
authored
Ock 17, 2002
tarafından
Mark Hammond
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Allow abspath to still do something sensisble if the nt module can not be imported.
üst
39230b32
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
1 deletion
+11
-1
ntpath.py
Lib/ntpath.py
+11
-1
No files found.
Lib/ntpath.py
Dosyayı görüntüle @
f717f050
...
...
@@ -457,8 +457,18 @@ def normpath(path):
# Return an absolute path.
def
abspath
(
path
):
"""Return the absolute version of a path"""
if
path
:
# Empty path must return current working directory.
try
:
from
nt
import
_getfullpathname
except
ImportError
:
# Not running on Windows - mock up something sensible.
global
abspath
def
_abspath
(
path
):
if
not
isabs
(
path
):
path
=
join
(
os
.
getcwd
(),
path
)
return
normpath
(
path
)
abspath
=
_abspath
return
_abspath
(
path
)
if
path
:
# Empty path must return current working directory.
try
:
path
=
_getfullpathname
(
path
)
except
WindowsError
:
...
...
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