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
eba67c0e
Kaydet (Commit)
eba67c0e
authored
Haz 04, 2010
tarafından
Martin v. Löwis
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #6470: Drop UNC prefix in FixTk.py
Patch by Christop Gohlke and Amaury Forgeot d'Arc.
üst
16b2a5e0
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
FixTk.py
Lib/lib-tk/FixTk.py
+2
-0
test_tcl.py
Lib/test/test_tcl.py
+25
-0
NEWS
Misc/NEWS
+2
-0
No files found.
Lib/lib-tk/FixTk.py
Dosyayı görüntüle @
eba67c0e
...
@@ -42,6 +42,8 @@ else:
...
@@ -42,6 +42,8 @@ else:
# Ignore leading \\?\
# Ignore leading \\?\
if
s
.
startswith
(
"
\\\\
?
\\
"
):
if
s
.
startswith
(
"
\\\\
?
\\
"
):
s
=
s
[
4
:]
s
=
s
[
4
:]
if
s
.
startswith
(
"UNC"
):
s
=
"
\\
"
+
s
[
3
:]
return
s
return
s
prefix
=
os
.
path
.
join
(
sys
.
prefix
,
"tcl"
)
prefix
=
os
.
path
.
join
(
sys
.
prefix
,
"tcl"
)
...
...
Lib/test/test_tcl.py
Dosyayı görüntüle @
eba67c0e
...
@@ -127,6 +127,31 @@ class TclTest(unittest.TestCase):
...
@@ -127,6 +127,31 @@ class TclTest(unittest.TestCase):
tcl
=
self
.
interp
tcl
=
self
.
interp
self
.
assertRaises
(
TclError
,
tcl
.
eval
,
'package require DNE'
)
self
.
assertRaises
(
TclError
,
tcl
.
eval
,
'package require DNE'
)
def
testLoadWithUNC
(
self
):
import
sys
if
sys
.
platform
!=
'win32'
:
return
# Build a UNC path from the regular path.
# Something like
# \\%COMPUTERNAME%\c$\python27\python.exe
fullname
=
os
.
path
.
abspath
(
sys
.
executable
)
if
fullname
[
1
]
!=
':'
:
return
unc_name
=
r'\\
%
s\%s$\%s'
%
(
os
.
environ
[
'COMPUTERNAME'
],
fullname
[
0
],
fullname
[
3
:])
with
test_support
.
EnvironmentVarGuard
()
as
env
:
env
.
unset
(
"TCL_LIBRARY"
)
f
=
os
.
popen
(
'
%
s -c "import Tkinter; print Tkinter"'
%
(
unc_name
,))
self
.
assert_
(
'Tkinter.py'
in
f
.
read
())
# exit code must be zero
self
.
assertEqual
(
f
.
close
(),
None
)
def
test_main
():
def
test_main
():
test_support
.
run_unittest
(
TclTest
,
TkinterTest
)
test_support
.
run_unittest
(
TclTest
,
TkinterTest
)
...
...
Misc/NEWS
Dosyayı görüntüle @
eba67c0e
...
@@ -46,6 +46,8 @@ C-API
...
@@ -46,6 +46,8 @@ C-API
Library
Library
-------
-------
- Issue #6470: Drop UNC prefix in FixTk.
- Issue #5610: feedparser no longer eats extra characters at the end of
- Issue #5610: feedparser no longer eats extra characters at the end of
a body part if the body part ends with a \r\n.
a body part if the body part ends with a \r\n.
...
...
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