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
d106b87e
Commit
d106b87e
authored
Jun 04, 2018
by
Michael Droettboom
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move to new tag of Iodide
parent
d7ea2c96
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
85 additions
and
4 deletions
+85
-4
Makefile
Makefile
+5
-0
src/matplotlib-sideload.html
src/matplotlib-sideload.html
+76
-0
src/matplotlib.html
src/matplotlib.html
+2
-2
src/python.html
src/python.html
+2
-2
No files found.
Makefile
View file @
d106b87e
...
...
@@ -76,6 +76,7 @@ all: build/pyodide.asm.js \
build/pyodide_dev.js
\
build/python.html
\
build/matplotlib.html
\
build/matplotlib-sideload.html
\
build/renderedhtml.css
\
build/numpy.data
\
build/dateutil.data
\
...
...
@@ -116,6 +117,10 @@ build/matplotlib.html: src/matplotlib.html
cp
$<
$@
build/matplotlib-sideload.html
:
src/matplotlib-sideload.html
cp
$<
$@
build/test.html
:
src/test.html
cp
$<
$@
...
...
src/matplotlib-sideload.html
0 → 100644
View file @
d106b87e
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"UTF-8"
>
<title>
Python - iodide
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://iodide-project.github.io/dist/iodide.pyodide-20180605.css"
>
</head>
<body>
<script
id=
"jsmd"
type=
"text/jsmd"
>
%%
meta
{
"
title
"
:
"
Python
"
,
"
languages
"
:
{
"
js
"
:
{
"
pluginType
"
:
"
language
"
,
"
languageId
"
:
"
js
"
,
"
displayName
"
:
"
Javascript
"
,
"
codeMirrorMode
"
:
"
javascript
"
,
"
module
"
:
"
window
"
,
"
evaluator
"
:
"
eval
"
,
"
keybinding
"
:
"
j
"
,
"
url
"
:
""
},
"
py
"
:
{
"
languageId
"
:
"
py
"
,
"
displayName
"
:
"
python
"
,
"
codeMirrorMode
"
:
"
python
"
,
"
keybinding
"
:
"
p
"
,
"
url
"
:
"
https://iodide-project.github.io/pyodide-demo/pyodide.js
"
,
"
module
"
:
"
pyodide
"
,
"
evaluator
"
:
"
runPython
"
,
"
pluginType
"
:
"
language
"
}
},
"
lastExport
"
:
"
2018-05-04T17:13:00.489Z
"
}
%%
md
Press
Shift
+
Enter
on
the
cell
below
to
display
the
plot
.
%%
code
{
"
language
"
:
"
py
"
}
</script>
<script>
var
blackout
=
document
.
createElement
(
'
div
'
);
blackout
.
setAttribute
(
'
style
'
,
'
width: 100%; height: 100%; position: absolute; left: 0; top: 0; background-color: #00000066; z-index: 10
'
);
document
.
body
.
appendChild
(
blackout
);
var
url_string
=
window
.
location
;
var
url
=
new
URL
(
url_string
);
var
content
=
url
.
searchParams
.
get
(
"
sideload
"
);
fetch
(
content
).
then
((
response
)
=>
response
.
text
())
.
then
((
text
)
=>
{
let
jsmd
=
document
.
getElementById
(
'
jsmd
'
);
jsmd
.
innerHTML
=
jsmd
.
innerHTML
+
text
;
let
script
=
document
.
createElement
(
'
script
'
);
script
.
src
=
'
https://iodide-project.github.io/dist/iodide.pyodide-20180605.js
'
;
script
.
onload
=
()
=>
{
let
pyodide
=
document
.
createElement
(
'
script
'
);
pyodide
.
src
=
'
https://iodide-project.github.io/pyodide-demo/pyodide.js
'
;
pyodide
.
onload
=
()
=>
{
languagePluginLoader
.
then
(()
=>
{
window
.
pyodide
.
loadPackage
(
'
matplotlib
'
).
then
(()
=>
{
window
.
pyodide
.
runPython
(
'
__name__ = "__main__"
'
);
blackout
.
parentNode
.
removeChild
(
blackout
);
});
});
};
document
.
body
.
appendChild
(
pyodide
);
}
document
.
body
.
appendChild
(
script
);
});
</script>
<div
id=
'page'
></div>
</body>
</html>
src/matplotlib.html
View file @
d106b87e
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"UTF-8"
>
<title>
Python - iodide
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://iodide-project.github.io/dist/iodide.pyodide-201
90518
.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://iodide-project.github.io/dist/iodide.pyodide-201
80605
.css"
>
</head>
<body>
<script
id=
"jsmd"
type=
"text/jsmd"
>
...
...
@@ -204,6 +204,6 @@ plt.gcf().canvas.mpl_connect('motion_notify_event', motion_notify)
plt.show()
</script>
<div
id=
'page'
></div>
<script
src=
'https://iodide-project.github.io/dist/iodide.pyodide-201
90518
.js'
></script>
<script
src=
'https://iodide-project.github.io/dist/iodide.pyodide-201
80605
.js'
></script>
</body>
</html>
src/python.html
View file @
d106b87e
...
...
@@ -3,7 +3,7 @@
<head>
<meta
charset=
"UTF-8"
>
<title>
Python - iodide
</title>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://iodide-project.github.io/dist/iodide.pyodide-201
90518
.css"
>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"https://iodide-project.github.io/dist/iodide.pyodide-201
80605
.css"
>
</head>
<body>
<script
id=
"jsmd"
type=
"text/jsmd"
>
...
...
@@ -262,6 +262,6 @@ A couple things that already work that will be coming to this example notebook s
%%
js
</script>
<div
id=
'page'
></div>
<script
src=
'https://iodide-project.github.io/dist/iodide.pyodide-201
90518
.js'
></script>
<script
src=
'https://iodide-project.github.io/dist/iodide.pyodide-201
80605
.js'
></script>
</body>
</html>
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