Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
11b2b9cf
Commit
11b2b9cf
authored
Nov 09, 2005
by
Georg Brandl
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #1338995: fix problem with new webbrowser.py.
parent
1c983276
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
Lib/webbrowser.py
Lib/webbrowser.py
+9
-4
No files found.
Lib/webbrowser.py
View file @
11b2b9cf
...
...
@@ -180,8 +180,11 @@ class UnixBrowser(BaseBrowser):
cmd
+=
' &'
rc
=
os
.
system
(
cmd
)
if
rc
:
cmd
=
"%s %s"
%
(
self
.
name
,
url
)
if
self
.
remote_background
:
cmd
+=
" &"
# bad return status, try again with simpler command
rc
=
os
.
system
(
"%s %s"
%
(
self
.
name
,
url
)
)
rc
=
os
.
system
(
cmd
)
return
not
rc
def
open
(
self
,
url
,
new
=
0
,
autoraise
=
1
):
...
...
@@ -209,6 +212,7 @@ class Mozilla(UnixBrowser):
remote_action
=
"openURL(%s)"
remote_action_newwin
=
"openURL(%s,new-window)"
remote_action_newtab
=
"openURL(%s,new-tab)"
remote_background
=
True
Netscape
=
Mozilla
...
...
@@ -240,7 +244,7 @@ class Konqueror(BaseBrowser):
if
_iscommand
(
"konqueror"
):
rc
=
os
.
system
(
self
.
name
+
" --silent '%s' &"
%
url
)
elif
_iscommand
(
"kfm"
):
rc
=
os
.
system
(
self
.
name
+
" -d '%s'"
%
url
)
rc
=
os
.
system
(
self
.
name
+
" -d '%s'
&
"
%
url
)
return
not
rc
def
open
(
self
,
url
,
new
=
0
,
autoraise
=
1
):
...
...
@@ -264,6 +268,7 @@ class Opera(UnixBrowser):
remote_action
=
"openURL(%s)"
remote_action_newwin
=
"openURL(%s,new-window)"
remote_action_newtab
=
"openURL(%s,new-page)"
remote_background
=
True
class
Elinks
(
UnixBrowser
):
...
...
@@ -459,7 +464,7 @@ if sys.platform == 'darwin':
new
=
int
(
bool
(
new
))
if
self
.
name
==
"default"
:
# User called open, open_new or get without a browser parameter
script
=
_safequote
(
'open location "%s"'
,
url
)
# opens in default browser
script
=
'open location "%s"'
%
url
.
replace
(
'"'
,
'%22'
)
# opens in default browser
else
:
# User called get and chose a browser
if
self
.
name
==
"OmniWeb"
:
...
...
@@ -468,7 +473,7 @@ if sys.platform == 'darwin':
# Include toWindow parameter of OpenURL command for browsers
# that support it. 0 == new window; -1 == existing
toWindow
=
"toWindow %d"
%
(
new
-
1
)
cmd
=
_safequote
(
'OpenURL "%s"'
,
url
)
cmd
=
'OpenURL "%s"'
%
url
.
replace
(
'"'
,
'%22'
)
script
=
'''tell application "%s"
activate
%s %s
...
...
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