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
8016a4b0
Kaydet (Commit)
8016a4b0
authored
Şub 27, 2001
tarafından
Jeremy Hylton
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Remove two meaningless, module-level global statements (one of a
non-existent variable :-). Reflow long lines.
üst
5e163336
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
7 deletions
+9
-7
webbrowser.py
Lib/webbrowser.py
+9
-7
No files found.
Lib/webbrowser.py
Dosyayı görüntüle @
8016a4b0
...
...
@@ -57,7 +57,6 @@ def open_new(url): # Marked deprecated. May be removed in 2.1.
# an xterm.
if
os
.
environ
.
get
(
"TERM"
)
or
os
.
environ
.
get
(
"DISPLAY"
):
PROCESS_CREATION_DELAY
=
4
global
tryorder
_tryorder
=
(
"mozilla"
,
"netscape"
,
"kfm"
,
"grail"
,
"links"
,
"lynx"
,
"w3m"
)
def
_iscommand
(
cmd
):
...
...
@@ -104,7 +103,9 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"):
def
_remote
(
self
,
action
,
autoraise
):
raise_opt
=
(
"-noraise"
,
"-raise"
)[
autoraise
]
cmd
=
"
%
s
%
s -remote '
%
s' >/dev/null 2>&1"
%
(
self
.
name
,
raise_opt
,
action
)
cmd
=
"
%
s
%
s -remote '
%
s' >/dev/null 2>&1"
%
(
self
.
name
,
raise_opt
,
action
)
rc
=
os
.
system
(
cmd
)
if
rc
:
import
time
...
...
@@ -152,7 +153,8 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"):
return
not
rc
def
open
(
self
,
url
,
new
=
1
,
autoraise
=
1
):
# XXX Currently I know no way to prevent KFM from opening a new win.
# XXX Currently I know no way to prevent KFM from
# opening a new win.
self
.
_remote
(
"openURL
%
s"
%
url
)
# Deprecated. May be removed in 2.1.
...
...
@@ -171,7 +173,8 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"):
import
pwd
import
socket
import
tempfile
tempdir
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
".grail-unix"
)
tempdir
=
os
.
path
.
join
(
tempfile
.
gettempdir
(),
".grail-unix"
)
user
=
pwd
.
getpwuid
(
_os
.
getuid
())[
0
]
filename
=
os
.
path
.
join
(
tempdir
,
user
+
"-*"
)
maybes
=
glob
.
glob
(
filename
)
...
...
@@ -216,7 +219,6 @@ if os.environ.get("TERM") or os.environ.get("DISPLAY"):
#
if
sys
.
platform
[:
3
]
==
"win"
:
global
_tryorder
_tryorder
=
(
"netscape"
,
"windows-default"
)
class
WindowsDefault
:
...
...
@@ -260,7 +262,7 @@ else:
# Optimization: filter out alternatives that aren't available, so we can
# avoid has_key() tests at runtime. (This may also allow some unused
# classes and class-instance storage to be garbage-collected.)
_tryorder
=
filter
(
lambda
x
:
_browsers
.
has_key
(
x
.
lower
())
or
x
.
find
(
"
%
s"
)
>-
1
,
\
_tryorder
)
_tryorder
=
filter
(
lambda
x
:
_browsers
.
has_key
(
x
.
lower
())
or
x
.
find
(
"
%
s"
)
>
-
1
,
_tryorder
)
# end
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