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
c92cdf7a
Kaydet (Commit)
c92cdf7a
authored
Mar 02, 2001
tarafından
Ka-Ping Yee
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
The sys.platform identifier for Windows is just 'win32' (for all varieties).
üst
7dcf84f2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
pydoc.py
Lib/pydoc.py
+8
-8
No files found.
Lib/pydoc.py
Dosyayı görüntüle @
c92cdf7a
...
@@ -801,8 +801,8 @@ def getpager():
...
@@ -801,8 +801,8 @@ def getpager():
return
plainpager
return
plainpager
if
os
.
environ
.
has_key
(
'PAGER'
):
if
os
.
environ
.
has_key
(
'PAGER'
):
return
lambda
a
:
pipepager
(
a
,
os
.
environ
[
'PAGER'
])
return
lambda
a
:
pipepager
(
a
,
os
.
environ
[
'PAGER'
])
if
sys
.
platform
in
[
'win'
,
'win32'
,
'nt'
]
:
if
sys
.
platform
==
'win32'
:
return
lambda
a
:
tempfilepager
(
a
,
'more'
)
return
lambda
a
:
tempfilepager
(
a
,
'more
<
'
)
if
hasattr
(
os
,
'system'
)
and
os
.
system
(
'less 2>/dev/null'
)
==
0
:
if
hasattr
(
os
,
'system'
)
and
os
.
system
(
'less 2>/dev/null'
)
==
0
:
return
lambda
a
:
pipepager
(
a
,
'less'
)
return
lambda
a
:
pipepager
(
a
,
'less'
)
...
@@ -835,7 +835,7 @@ def tempfilepager(text, cmd):
...
@@ -835,7 +835,7 @@ def tempfilepager(text, cmd):
file
.
write
(
text
)
file
.
write
(
text
)
file
.
close
()
file
.
close
()
try
:
try
:
os
.
system
(
cmd
+
'
<
'
+
filename
)
os
.
system
(
cmd
+
' '
+
filename
)
finally
:
finally
:
os
.
unlink
(
filename
)
os
.
unlink
(
filename
)
...
@@ -1193,7 +1193,7 @@ def gui():
...
@@ -1193,7 +1193,7 @@ def gui():
self
.
stop_btn
=
Tkinter
.
Button
(
self
.
search_frm
,
self
.
stop_btn
=
Tkinter
.
Button
(
self
.
search_frm
,
text
=
'stop'
,
pady
=
0
,
command
=
self
.
stop
,
state
=
'disabled'
)
text
=
'stop'
,
pady
=
0
,
command
=
self
.
stop
,
state
=
'disabled'
)
if
sys
.
platform
==
'win32'
:
if
sys
.
platform
==
'win32'
:
#
Attempt
ing to hide and show this button crashes under Windows.
#
Try
ing to hide and show this button crashes under Windows.
self
.
stop_btn
.
pack
(
side
=
'right'
)
self
.
stop_btn
.
pack
(
side
=
'right'
)
self
.
window
.
title
(
'pydoc'
)
self
.
window
.
title
(
'pydoc'
)
...
@@ -1208,7 +1208,7 @@ def gui():
...
@@ -1208,7 +1208,7 @@ def gui():
self
.
search_frm
.
pack
(
side
=
'top'
,
fill
=
'x'
)
self
.
search_frm
.
pack
(
side
=
'top'
,
fill
=
'x'
)
self
.
search_ent
.
focus_set
()
self
.
search_ent
.
focus_set
()
font
=
(
'helvetica'
,
sys
.
platform
in
[
'win32'
,
'win'
,
'nt'
]
and
8
or
10
)
font
=
(
'helvetica'
,
sys
.
platform
==
'win32'
and
8
or
10
)
self
.
result_lst
=
Tkinter
.
Listbox
(
window
,
font
=
font
,
height
=
6
)
self
.
result_lst
=
Tkinter
.
Listbox
(
window
,
font
=
font
,
height
=
6
)
self
.
result_lst
.
bind
(
'<Button-1>'
,
self
.
select
)
self
.
result_lst
.
bind
(
'<Button-1>'
,
self
.
select
)
self
.
result_lst
.
bind
(
'<Double-Button-1>'
,
self
.
goto
)
self
.
result_lst
.
bind
(
'<Double-Button-1>'
,
self
.
goto
)
...
@@ -1252,7 +1252,7 @@ def gui():
...
@@ -1252,7 +1252,7 @@ def gui():
import
webbrowser
import
webbrowser
webbrowser
.
open
(
url
)
webbrowser
.
open
(
url
)
except
ImportError
:
# pre-webbrowser.py compatibility
except
ImportError
:
# pre-webbrowser.py compatibility
if
sys
.
platform
in
[
'win'
,
'win32'
,
'nt'
]
:
if
sys
.
platform
==
'win32'
:
os
.
system
(
'start "
%
s"'
%
url
)
os
.
system
(
'start "
%
s"'
%
url
)
elif
sys
.
platform
==
'mac'
:
elif
sys
.
platform
==
'mac'
:
try
:
try
:
...
@@ -1353,8 +1353,8 @@ def cli():
...
@@ -1353,8 +1353,8 @@ def cli():
class
BadUsage
:
pass
class
BadUsage
:
pass
try
:
try
:
if
sys
.
platform
in
[
'mac'
,
'win
'
,
'win32'
,
'nt
'
]
and
not
sys
.
argv
[
1
:]:
if
sys
.
platform
in
[
'mac'
,
'win
32
'
]
and
not
sys
.
argv
[
1
:]:
#
CLI-less platforms
#
graphical platforms with threading (and no CLI)
gui
()
gui
()
return
return
...
...
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