Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • 04:33

    dalcde on master

    Flexible jsimport (#1146) This… (compare)

  • 00:48

    dalcde on master

    Mark pythonexc2js as noreturn (… (compare)

  • Jan 16 12:50

    phorward on master

    Don't print duplicate error mes… (compare)

  • Jan 16 06:36

    dalcde on master

    Move call and new to JsMethod (… (compare)

  • Jan 16 05:34

    dalcde on master

    BUGFIX: Bind functions to windo… (compare)

  • Jan 16 02:40

    dalcde on master

    Fine tuning of error_handling d… (compare)

  • Jan 16 01:00

    dalcde on master

    Touch npm binaries after instal… (compare)

  • Jan 15 09:45

    rth on master

    BLD Remover linker flags when b… (compare)

  • Jan 15 09:41

    rth on master

    TST Don't set stackTraceLimit t… (compare)

  • Jan 15 03:26

    dalcde on master

    Simplify pythonexc2js and add m… (compare)

  • Jan 14 10:15

    rth on master

    Add InteractiveConsole in pyodi… (compare)

  • Jan 14 07:35

    rth on master

    FIX: Make JsBoundMethod a subcl… (compare)

  • Jan 13 22:16

    rth on master

    Fix error in JsProxy_Call kwarg… (compare)

  • Jan 13 21:20

    rth on master

    MAINT Replace var ==> let and a… (compare)

  • Jan 13 20:15
    Heroku [iodide-staging] deployed 2183bdc1
  • Jan 13 11:07

    rth on master

    TST Convert some package tests … (compare)

  • Jan 13 08:20

    dalcde on master

    MAINT: Update conftest to check… (compare)

  • Jan 12 22:18

    rth on master

    TST Don't print python tracebac… (compare)

  • Jan 12 22:14

    rth on master

    MAINT: Use PyConfig to configur… (compare)

  • Jan 12 19:58

    rth on master

    MAINT: Small fixes to fail macr… (compare)

NELSON SILVA
@njss
?
William Lachance
@wlach
@njss this isn't supported unfortunately-- it looks like you found the right issue: iodide-project/iodide#2551 -- note that iodide isn't under active development at the moment
Paul m. p. P.
@pmp-p
@subwaymatch maybe you could help on that one iodide-project/pyodide#97 i think there's a python only solution to it but i haven't even started yet https://github.com/pmp-p/x-python/tree/wasm-runtime
Ye Joo Park
@subwaymatch
@pmp-p Will take a look at it, thanks.
Aditya Shankar
@therealadityashankar
[project showoff]
I created a project called wc-code that uses pyodide
here is a minimal example
<!DOCTYPE html>
<head>
<script type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/wc-code@1.0.3/src/wc-code.js"></script>
</head>
<body>
  <wc-code mode="python">
    <script type="wc-content">
       a = 1
       b = 1
       print(a+b)
    </script>
  </wc-code>                                                                                         
</body>
essentially it'll let you run the code in the browser via pyodide
I've been using this in my website, for example here https://adityashankar.xyz/study/python/introduction-to-python
William Lachance
@wlach
@therealadityashankar cool!
Aditya Shankar
@therealadityashankar
Dexter Chua
@dalcde
What are the policies/strategies on updating pyodide python package versions?
specifically my project wants a newer version of pyodide; I can change it manually but I also see no reason not to update it upstream
matrixbot
@matrixbot
honeyverybadger yes
matrixbot
@matrixbot
dalcde (I asked the previous question; I switched to the matrix bridge)
matrixbot
@matrixbot
dalcde If someone happens to have a built pyodide lying around, can you post the output of wasm-objdump pyodide/packages/lxml/build/lxml-4.4.1/install/lib/python3.8/site-packages/lxml/etree.so | grep PyInit ?
mehmetoguzderin
@mehmetoguzderin:matrix.org
[m]
(Test message from Element client)
matrixbot
@matrixbot
jcaesar Oh, that looks a lot better on gitter than I'm used to...
1 reply
matrixbot
@matrixbot
wlach 👋
teon
@teonbrooks:matrix.org
[m]
👋🏾
Aditya Shankar
@therealadityashankar
Hi !
Would it be cool to add my project wc-code to like a "projects built with pyodide" section ? [sorry if this is spammy, a no without an explanation is totally okay with me]
example :
<!DOCTYPE html>
<head>
<script type="module" src="https://cdn.jsdelivr.net/gh/vanillawc/wc-code@1.0.3/src/wc-code.js"></script>
</head>
<body>
  <wc-code mode="python">
    <script type="wc-content">
        i = 0

        while i<10:
            print(f"currently at : {i}")
            i += 1
    </script>
  </wc-code>                                                                                         
</body>
example output
image.png
I think this is going to be very relevant to the people who land up in this repository
Aditya Shankar
@therealadityashankar
(also you need a file-server to run the above html code and put it in a browser...because wasm)
rthy
@rthy:matrix.org
[m]
Yes, we can makae related projects pages. Please make a PR creating

a docs/ecosystem.md (unless you think of a better name) that is linked in index.rst under the "Project" section. With a title 'Related packages' and subtitle "Projects using Pyodide"

This could also be the occasion to mention/thank the projects we rely on and in particular emscripten

or maybe docs/related-projects.md would be better
Antonis Christofides
@aptiko
Hey, people, I'm a pyodide beginner. I'm trying to compile it and after it compiles a lot of modules it gives me this:
sed -i -e 's/\-undefined dynamic_lookup//' /home/anthony/learn-webassembly/pyodide/cpython/build/Python-3.8.2/Lib/_sysconfigdata__emscripten_.py                               
sed: can't read /home/anthony/learn-webassembly/pyodide/cpython/build/Python-3.8.2/Lib/_sysconfigdata__emscripten_.py: No such file or directory                               
make[1]: *** [Makefile:123: /home/anthony/learn-webassembly/pyodide/cpython/build/Python-3.8.2/libpython3.8.a] Error 2
make[1]: Leaving directory '/home/anthony/learn-webassembly/pyodide/cpython'           
make: *** [Makefile:240: cpython/installs/python-3.8.2/lib/python3.8] Error 2
BTW, I have Python 3.8.7 installed. Is this a problem? Should I install 3.8.2 instead?
Antonis Christofides
@aptiko
Hmmm, Docker doesn't have this problem. I had to make clean first, otherwise I got the same message. It's still compiling, but judging from the time that has elapsed, it has gone past this point. Incidentally, Docker has Python 3.8.2.
rthy
@rthy:matrix.org
[m]
yes you need Python 3.8.2 if you install it outside of Docker. You can install it for instance with conda
skelsec
@skelsec
Hello everyone! I'm new to Pyodide, and really interested in getting a JS websocket into my python code, however all of my attempts have failed hence I'm here. When I'm trying to achieve is to delegate a python function as an onmessage callback (that part works) and to invoke the "send" methon from python, the latter doesn't seem to be working. Should it? or am I misunderstanding some basic concept that would forbid me to achieve this?
tried sharing a queue from py->JS , tried getting the send function itself from a JS function to py, tried invoking the WebScoket.new from python (which works, but the send method doesnt)
Paul m. p. P.
@pmp-p
@skelsec is your python code asynchronous ?
skelsec
@skelsec
@pmp-p yes the goal would be to integrate it in an async project of mine (have high hopes that iodide-project/pyodide#958 will be accepted soon. BUT for testing purposes I'd be happy to see even a simple callback based solution at work.
Paul m. p. P.
@pmp-p
actual cpython select stdlib based loop can work with some corrections for threading. it's more durable to implement bsdsocket with peek option and afaik it's also that wasi is going to do
skelsec
@skelsec
my question is more on the "is this currently supported and if yes, how?" side
Paul m. p. P.
@pmp-p
i thought i was clear on how, for currently supported on pyodide i don't think so because you need a small kernel js side, but i could be wrong
rthy
@rthy:matrix.org
[m]
Hello @skelsec and welcome! Could you please open an issue or a StackOverflow question (using a pyodide tag) with a minimal example that you have tried? The issue with gitter is that it's not well indexed by search engines so the all detailed discussion is essentially "lost" here in the future.
The BossHead
@TheBosshead_twitter
Hello all! New to pyodide. When I import scipy in Chrome, it throws a ton of these "DevTools failed to load SourceMap: Could not load content for wasm://wasm/_nnls.cpython-38-x86_64-linux-gnu.wasm.map: HTTP error: status code 404, net::ERR_UNKNOWN_URL_SCHEME" errors. It doesn't do that in Firefox. Any clue as to why?
rthy
@rthy:matrix.org
[m]
Hello @TheBosshead_twitter Please open an issue on github indicating versions of pyodide and Chrome that you are using. Ideally with a minimal reproducible example.
Antonis Christofides
@aptiko
Hey people, I'm trying to run pyodide (I'm a beginner) on a Vue application (also a beginner). I can't figure out how (and whether) I can use pyodide with node/webpack. I tried, for example, import { languagePluginLoader } from 'pyodide' and various other things, but nothing I've tried works.
dalcde
@dexter:hailstorm.adm.srcf.net
[m]
I don't think it works at the moment, but some people are looking into it
Antonis Christofides
@aptiko
Is iodide-project/pyodide#14 what I'm looking for?
Antonis Christofides
@aptiko
So, I've had some success with this:
const languagePluginLoader = require('pyodide');
languagePluginLoader.then(() => { console.log(self.pyodide.runPython('import sys; sys.version')); });
Antonis Christofides
@aptiko

So, when Python, numpy and pandas are all loaded, executing pyodide.runPython('import numpy') takes about 5 seconds on my system; import pandas takes about 10 seconds. (These are with Firefox; Chrome times are different but similar.)

I noticed that even in CPython the times needed to import these are non-negligible; import pandas takes 0.5 to 1 second, depending on the status of disk cache. import numpy is faster but clearly not instant (I didn't measure it).

But why the long times in pyodide?

3 replies
dalcde
@dexter:hailstorm.adm.srcf.net
[m]
One possibility is that we lz4 compress all files, and they are decompressed on the fly when you use them
Antonis Christofides
@aptiko