From c9fd3e1d572354113ca57351a09c09c872ba0f56 Mon Sep 17 00:00:00 2001 From: Simon Biggs Date: Sat, 9 May 2020 07:22:33 +1000 Subject: [PATCH] DOC Complete example for using micropip (#412) --- docs/pypi.md | 39 ++++++++++++++++++++++++++++++++++++--- 1 file changed, 36 insertions(+), 3 deletions(-) diff --git a/docs/pypi.md b/docs/pypi.md index 73a2ba9c3..b1066efad 100644 --- a/docs/pypi.md +++ b/docs/pypi.md @@ -33,10 +33,43 @@ finished loading: ``` def do_work(*args): - import snowballstemmer - stemmer = snowballstemmer.stemmer('english') - stemmer.stemWords('go goes going gone'.split()) + import snowballstemmer + stemmer = snowballstemmer.stemmer('english') + print(stemmer.stemWords('go goes going gone'.split())) import micropip micropip.install('snowballstemmer').then(do_work) ``` + +## Complete example + +Adapting the setup from the section on ["using pyodide from +javascript"](./using_pyodide_from_javascript.html) a complete example would be, + +```html + + + + + + + + + +```