Let’s Use Replit to Embed Python
I recently forked a repo to make a Ycash Wallet generator. I’d like to add it to my website for people to try. Replit is an extremely cool…
I recently forked a repo to make a Ycash Wallet generator. I’d like to add it to my website for people to try. Replit is an extremely cool thing that I recently stumbled upon.
After you create an account, simply click the plus button you see at the top right corner of the screen.
Next we decide what language we want to use. I can’t wait to start embedding Julia, but this one is just Python.
After this we pretty much get a full blown IDE. We have a text editor, a console and a file explorer along with a few other bells and whistles.
You can upload files by simply dragging and dropping them into the file explorer. After creating your new project, make sure it’s ready to go, and then publish it. Once published you can embed your REPL in an html page as a simple iframe. Here’s my first one.
<iframe frameborder="0" width="400px" height="300px" src="https://replit.com/@JakeNulty/YEC-Address-Generator?embed=true"></iframe>
Open the page in my browser…
You can try out my REPL here. Thanks for reading, I look forward to seeing embedded REPLs in the future. This is a super convenient way of sharing and running code… And I forgot to mention, I paid $0 to do any of this. My website is hosted for free on Github, and my Replit account was completely FREE!!!