Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
pyodide
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
pyodide
Commits
5041c4dd
Commit
5041c4dd
authored
Mar 22, 2018
by
Michael Droettboom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add version of webbrowser.py that works in pyodide
parent
199b6ff2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
1 deletion
+14
-1
Makefile
Makefile
+3
-1
src/webbrowser.py
src/webbrowser.py
+11
-0
No files found.
Makefile
View file @
5041c4dd
...
...
@@ -41,7 +41,7 @@ build/pyodide.asm.html: src/main.bc src/jsimport.bc src/jsproxy.bc src/js2python
$(
foreach
d,
$(
wildcard
root/
*
)
,--preload-file
$d
@/
$(
notdir
$d
))
build/pyodide.js
:
src/pyodide.js
build
build/pyodide.js
:
src/pyodide.js
cp
$<
$@
...
...
@@ -61,6 +61,7 @@ root/.built: \
$(NUMPY_LIBS)
\
src/lazy_import.py
\
src/sitecustomize.py
\
src/webbrowser.py
\
remove_modules.txt
rm
-rf
root
mkdir
-p
root/lib
...
...
@@ -69,6 +70,7 @@ root/.built: \
rm
-fr
$(SITEPACKAGES)
/numpy/distutils
cp
src/lazy_import.py
$(SITEPACKAGES)
cp
src/sitecustomize.py
$(SITEPACKAGES)
cp
src/webbrowser.py root/lib/python
$(PYMINOR)
(
\
cd
root/lib/python
$(PYMINOR)
;
\
rm
-fr
`
cat
../../../remove_modules.txt
`
;
\
...
...
src/webbrowser.py
0 → 100755
View file @
5041c4dd
#! /usr/bin/env python3
def
open
(
url
,
new
=
0
,
autoraise
=
True
):
from
js
import
window
window
.
open
(
url
,
"_blank"
)
def
open_new
(
url
):
return
open
(
url
,
1
)
def
open_new_tab
(
url
):
return
open
(
url
,
2
)
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