Other Useful Features
00:00 Okay. So after debugging, let’s take a look at a couple of other useful features that are built into this online Repl.it IDE. We’ve seen there’s a couple of things here on the site, and the first one we’re going to look at is Files.
00:14 You’re not actually restricted to just this one file, the script that we’re running here, but just as you could do on your computer locally, you can create additional files! And it works in the same way as it would there.
So I make this
hello.py file, for example. It opens it up for me here in the editor. Let’s just define a variable in here. Yeah. And I can go ahead and import this in my other file, so I hop over here and I say
from hello—and you see the autocompletion already knows that this exists. From
hello I want to import
name—and there it is. And now I can print it out in here.
01:09 So, anything that you could do in a normal file system as well, which makes it pretty powerful—there’s a lot of stuff you can build like that. And it gets even better—let’s look at the second one here, Packages.
Let’s do something very meta now, okay? I’m going to take this URL of this same page—let’s go get it.
res (response) equals
requests.get()—just to prove to you that this is working—pop in the URL,
And then afterwards, our code runs. The little
for loop that gives us those squares. So, that’s maybe a fun thing, but the takeaway is you can install all sorts of external packages and work with them in here as you would locally. So something else—this is also a nice feature here, auto-format. For example, let’s say I’m writing my code not very nicely, or I make some mistakes in here.
03:26 Okay. So, auto-format—what else do we have here? Multiplayer mode—I’m not going to go into this now, but just so you know, this exists and they’re working on it to improve it also. This allows you to actually collaboratively edit a file, so a couple of people could be in the same file and we could all be typing there and collaboratively editing a code example that can also run and see the execution of together, everyone at the same time over the internet.
03:52 So that’s pretty awesome. All right, and the last thing here we have—also, you can change the theme. So I mentioned before, we have this on the left and this on the right side—if you prefer to have it stacked, you can do that.
04:09 So it’s even somewhat customizable in terms of the layout, which is pretty cool! Yeah. And one more thing I want to show you, like, because we’re working on the internet, so that gives us a lot of opportunities to share the code.
And so I want to do something else meta. I’m in a meta mood. I’m going to get this
<iframe> here, because we can embed this Repl for other people to see, and another thing I want to show you is that you can work with this not only using Python, but lots of other languages.
04:39 So we have here Django, Node.js, Java, C++, et cetera. So there’s tons and tons of languages that are supported. And among other things, also HTML, so I’m just going to make a little meta HTML page…
05:46 There you go. So, that’s pretty cool! You can make your little code examples, you can embed them into your HTML page. People can go to your page, to your blog, maybe, they can run your examples and just execute them, make copies of it, edit it forward.
06:20 So you can check out—there’s a form up there, there’s questions, you can see other people’s code. You can comment on it, you can edit their code. There’s very cool projects that you can check out. Yeah, I mean, that’s the big advantage of having an online community—that there’s a lot of people involved and a lot of people make cool stuff. Okay, so I think that’s all I wanted to show you in terms of the other cool functionalities with Repl.it. Make sure to check it out if you’re interested. And yeah, this is an example for one of those online coding environments that exist.
06:52 There’s of course other ones as well. And if you have the need to maybe share some code with friends, think of this—that this is an option that’s probably going to work better and more effectively than sending your code by email. Okay.
Become a Member to join the conversation.