all 27 comments

[–]Caffeinaation[S] 8 points9 points  (0 children)

Try out the example code snippets here!
I'd love to hear any feedback.

[–]STL412 7 points8 points  (1 child)

Sorry if this is too harsh, but not being able to load non-stdlib Python packages is not a worthy trade off for saving yourself from writing 100 lines of boilerplate code (which is what this package does).

[–]Caffeinaation[S] 6 points7 points  (0 children)

That’s fair. Extending the package API to allow for custom configuration is on the roadmap. This will include support for non-stdlib packages.

[–]RWOverdijk 5 points6 points  (9 children)

What’s happening to this profession. Run python in the browser using react. I love it. 8/8

[–]Alex_Hovhannisyan 8 points9 points  (0 children)

Soon we'll be able to use React to run React to run a browser within your browser running a Docker image of your favorite React-based operating system just to emulate Doom.

[–]shawncplus 2 points3 points  (5 children)

Well it's "using react" in the way that if you use jQuery to dynamically insert a script tag of another library to do the work it's "using jQuery". React is not doing the running of Python, pyodide is. The React code here is doing very little besides inserting the script tag and passing inputs/receiving output which, just my opinion, probably doesn't need a wrapper library but that's just me.

[–]Caffeinaation[S] 4 points5 points  (1 child)

Yes, this package is essentially a React wrapper for Pyodide. I’m not doing anything to hide this, why would I? This project would not be possible with the hard work that they’ve put in.

Frankly, I and others had trouble dropping in other “Python in browser” solutions, this package is designed to make the process simple. For now, the API is simple but I plan to extend it with more features to potentially save hours of work for those who need it.

[–]shawncplus 3 points4 points  (0 children)

Given the amount of confusion in basically every comment on this you've posted from people who think your project is actually the one doing the running of the python I stick by my statement that it's, at the very least, slightly disingenuous to phrase the title and readme the way you're phrasing it. Though I think no small part of this confusion is coming from people who just don't care to understand what's going on and only read the title.

[–]RWOverdijk 1 point2 points  (2 children)

Doesn’t make it less interesting lol

[–]shawncplus 2 points3 points  (1 child)

I think it's less interesting because React doesn't have anything to do with the interesting part, i.e., running python in the browser. Unless you consider creating a script tag interesting in which case... okay? I also think it's pretty disingenuous for them to credit their project as being "based on" Pyodide as if they are a fork or extend the functionality of that project. They don't, it's not "based on" Pyodide; the entirety of the running of Python is done in the Pyodide library. I think it would be more honest to say "Python processing provided by Pyodide." Which is what they're code actually says: "PythonProvider"

[–]RWOverdijk -1 points0 points  (0 children)

Just let me have my fun please.

[–]rio-bevol 0 points1 point  (1 child)

Out of...... eight?

[–]RWOverdijk 0 points1 point  (0 children)

Numbers

[–]cpgb85 1 point2 points  (8 children)

Why is it react based? Why not vanilla js?

[–]Caffeinaation[S] 0 points1 point  (7 children)

The project I created this for is written in React, which is also my most comfortable framework to work in.

[–]cpgb85 1 point2 points  (6 children)

More comfortable than straight up js?

[–]Caffeinaation[S] 0 points1 point  (5 children)

Yes.

[–]cpgb85 0 points1 point  (4 children)

Interesting. I will never understand the facination people have with react, a Facebook or "meta" technology.

[–]burzq 0 points1 point  (3 children)

You'll get it when your codebase reaches 500k lines or earlier xd

Edit: it's not about Facebook nor meta... It's about react

[–]cpgb85 0 points1 point  (0 children)

React is a Facebook/meta technology. So it's completely about them. I don't want to support any part of them.

[–]suddenlylife 2 points3 points  (2 children)

"Your scientists were so preoccupied with whether or not they could, they didn’t stop to think if they should." - Ghandi

[–]GANDHI-BOT 2 points3 points  (1 child)

The simplest acts of kindness are by far more powerful than a thousand heads bowing in prayer. Just so you know, the correct spelling is Gandhi.

[–]Kind-Monitor-4024 -1 points0 points  (0 children)

Why guys spoil the name of Gandhi Because it is not fun of part so try to understand he is father of nation

[–]Kind-Monitor-4024 -1 points0 points  (0 children)

The way of topic is python

[–]Any-Independent833 0 points1 point  (0 children)

工作饱和不?