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
a1fd5e4b
Kaydet (Commit)
a1fd5e4b
authored
Eki 30, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
- Issue #23262: The webbrowser module now supports Firefox 36+ and derived
browsers. Based on patch by Oleg Broytman.
üst
016a9acb
c9b750d2
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
48 additions
and
8 deletions
+48
-8
test_webbrowser.py
Lib/test/test_webbrowser.py
+25
-0
webbrowser.py
Lib/webbrowser.py
+20
-8
NEWS
Misc/NEWS
+3
-0
No files found.
Lib/test/test_webbrowser.py
Dosyayı görüntüle @
a1fd5e4b
...
...
@@ -93,6 +93,31 @@ class MozillaCommandTest(CommandTestMixin, unittest.TestCase):
browser_class
=
webbrowser
.
Mozilla
def
test_open
(
self
):
self
.
_test
(
'open'
,
options
=
[],
arguments
=
[
URL
])
def
test_open_with_autoraise_false
(
self
):
self
.
_test
(
'open'
,
kw
=
dict
(
autoraise
=
False
),
options
=
[],
arguments
=
[
URL
])
def
test_open_new
(
self
):
self
.
_test
(
'open_new'
,
options
=
[],
arguments
=
[
'-new-window'
,
URL
])
def
test_open_new_tab
(
self
):
self
.
_test
(
'open_new_tab'
,
options
=
[],
arguments
=
[
'-new-tab'
,
URL
])
class
NetscapeCommandTest
(
CommandTestMixin
,
unittest
.
TestCase
):
browser_class
=
webbrowser
.
Netscape
def
test_open
(
self
):
self
.
_test
(
'open'
,
options
=
[
'-raise'
,
'-remote'
],
...
...
Lib/webbrowser.py
Dosyayı görüntüle @
a1fd5e4b
...
...
@@ -245,7 +245,17 @@ class UnixBrowser(BaseBrowser):
class
Mozilla
(
UnixBrowser
):
"""Launcher class for Mozilla/Netscape browsers."""
"""Launcher class for Mozilla browsers."""
remote_args
=
[
'
%
action'
,
'
%
s'
]
remote_action
=
""
remote_action_newwin
=
"-new-window"
remote_action_newtab
=
"-new-tab"
background
=
True
class
Netscape
(
UnixBrowser
):
"""Launcher class for Netscape browser."""
raise_opts
=
[
"-noraise"
,
"-raise"
]
remote_args
=
[
'-remote'
,
'openURL(
%
s
%
action)'
]
...
...
@@ -254,8 +264,6 @@ class Mozilla(UnixBrowser):
remote_action_newtab
=
",new-tab"
background
=
True
Netscape
=
Mozilla
class
Galeon
(
UnixBrowser
):
"""Launcher class for Galeon/Epiphany browsers."""
...
...
@@ -430,14 +438,18 @@ def register_X_browsers():
if
shutil
.
which
(
"x-www-browser"
):
register
(
"x-www-browser"
,
None
,
BackgroundBrowser
(
"x-www-browser"
))
# The Mozilla/Netscape browsers
for
browser
in
(
"mozilla-firefox"
,
"firefox"
,
"mozilla-firebird"
,
"firebird"
,
"iceweasel"
,
"iceape"
,
"seamonkey"
,
"mozilla"
,
"netscape"
):
# The Mozilla browsers
for
browser
in
(
"firefox"
,
"iceweasel"
,
"iceape"
,
"seamonkey"
):
if
shutil
.
which
(
browser
):
register
(
browser
,
None
,
Mozilla
(
browser
))
# The Netscape and old Mozilla browsers
for
browser
in
(
"mozilla-firefox"
,
"mozilla-firebird"
,
"firebird"
,
"mozilla"
,
"netscape"
):
if
shutil
.
which
(
browser
):
register
(
browser
,
None
,
Netscape
(
browser
))
# Konqueror/kfm, the KDE browser.
if
shutil
.
which
(
"kfm"
):
register
(
"kfm"
,
Konqueror
,
Konqueror
(
"kfm"
))
...
...
Misc/NEWS
Dosyayı görüntüle @
a1fd5e4b
...
...
@@ -31,6 +31,9 @@ Core and Builtins
Library
-------
- Issue #23262: The webbrowser module now supports Firefox 36+ and derived
browsers. Based on patch by Oleg Broytman.
- Issue #27939: Fixed bugs in tkinter.ttk.LabeledScale and tkinter.Scale caused
by representing the scale as float value internally in Tk. tkinter.IntVar
now works if float value is set to underlying Tk variable.
...
...
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