tskit
tskit copied to clipboard
Document Pyodide/PyScript usage.
Advertise possibilities, advise of limitations and give an example of loading a ts from a URL and plotting it.
How do we load from a URL easily? We marked https://github.com/tskit-dev/tskit/issues/1566 as low priority, but maybe this now moves it up the stack?
#1566 won't help here, unless we specifically write it to detect it is running in Pyodide. This is because you can't open sockets like normal Python due to the web security model, so modules like requests
don't work.
I'll figure out the fetching code - you have to call JavaScript methods to do the fetching.
Ah, yes, of course. I forgot about requests
not being allowed. I guess it would also be useful to be able to display SVGs or Matplotlib output, which is going to be more JS faffing.
I don't that the faffing there is so bad. Jupyterlite is always an option.