Welcome to the real python podcast. This is episode two hundred twenty nine. What keeps your Spark alive for developing software and learning python? Do you like to try new frameworks, build toy projects or collaborate with other developers?
Krystal H. A. Trudeau is back on the show this week, bringing another atch of py cotters weekly articles and projects.
We discussed the joy of tinkering with python as a way to keep your developers skills sharp. We tagged into our techniques for continuing to learn and build projects. Christoph res, an article examining the performance of python three thirteenth free threatened features. The peace uses a clever example to measure how IT behaves with large data sets and paralyzing.
We share several other articles and projects from the python community, including a group of new releases, common use cases and examples for python closures, finding the opposite of cloud native, expLoring python soft keywords, command line utility for taking automated screen shots of websites, and putting the jingle admin in the terminal with text tool. This episode is brought to you by wind surf, the first truly agenticity A I powered I D E created by the code um team when serve combines the best of copilot and agents to bring you tomorrow's editor today. All right, let's get started.
The real python podcast is a weekly conversation about using python in the real world. My name is Christopher Bailey, I your host. Each week, we feature interviews with experts in the community and discussions about the topics, articles and courses found at real python dark com after the broadcast.
Join us and learn real world python skills with the community of experts and real python dark com. A Christopher, welcome back here there all right, we're digging in with actually a few pieces in news this week and are usual links and projects. So we got for .
us yeah a few released announcements. Somehow it's a week without anything to say about a pipeline and alpha, which makes me very, very disappointed. I don't know what those lazy guys that the P.
S. Have been doing anyhow. Jane, five point one point three came out. IT has a couple of minor bug fixes in this one. You don't have to hurry out to IT, but they did add the python three thirteen a support to their test.
We so if you were mucking around with thirteen and jane, then you might wanna b that the next step is the release of pillow eleven pillows and image library, which originally forked off of pill, which is kind of funny that we keep saying that, saying as it's probably been pillow longer than IT was but then I still tweet on twitter, so who might know? right. X anyways, this release had a few changes, but mostly was the compatibility released with older versions of python and Operating systems removed in a bunch of stuff that and similarly, the other released this week is vast three, one like with pillow. There's a couple small things in there, but mostly to build dropping python three, eight testing and updating some defendants.
Nice to people to do that for them.
I'm guessing I was good. Less code to check. And then the other bit of news is the call for proposals for piton U S.
Twenty twenty five is out. Next year's conferences is in pz burg. So if you want to give talk or tutorial is time to submit a proposal.
All right, well, that get this right into our topics. This week I have a real python one is for a my friend, lay, honest or almost. And this one is about python closures.
The subtitle is common uses and examples. So kind of a tour of some functionality that built into python that maybe you aren't familiar there. There are the terminology.
It's interesting that this idea of a closure is a common feature of functional programing languages. And again, that shows the start of flexibility of python. This idea that IT can work in so many different directions in ways that you'd want.
And I think that's one of the most appealing things about python to people. This is giving you an idea of what you might have already use some of these things that i'm onna tour through. But the idea of a closure is, uh, function that's defined inside of another function.
There is a little bit of difference there. We're going to get into IT. He starts with this concept that, okay, sure, you're defining a function inside of another function. And IT can access our update objects that are inside the enclosing function. And its first example that he provides is showing off the concept that all closures are inflections, but not all interface cast are closures.
And so the difference there is this idea that you can build that so structurally, but if you don't have a return, this inner function object from the other function, then it's really not truly kind of a closure. It's not providing that functionality. And so yes, functions can return functions and functions can accept the function.
And that's where we hit our favorite sound effect, because everything in python is an object. Yeah, every go, three components that he says you need to have here is an outer or enclosing function variables that are local to that outer function, and then an inner or nested function to find inside the other function. And then in that particular case, interface can object returns from the other function.
So the techniques that have shown, he shows creating closures to retain the state of stuff. One example would be a factory function, a function that returns, a function defined by parameters that are given to IT. This is a really common example.
I O C is something mathematical. It's like, okay, you can have the thing that raises something to the power of something. So have a function that returns a function that you can say, well, I wanted to raise things to the sixth power or the fifth power.
Heg does the opposite here he does a root calculator, as an examples, are kind of flipping on on a head a little bit. But if you have to know with this idea of functions, creating functions, this is a good, a little bit of introduction of this concept. He talks about stateless functions, a closure that is used to retain the state between function calls.
He provides an example of building like a accumulative average. So every time that you run this thing with a new value, the average is is being updated and the state is being retained. Inside, the function talks about gooey libraries a little bit and how you can have a call back function and provides an example like a, but being assigned a particular command that has this call back, that again, this function calling a function decorators, which is a very deep rabat hole, the example that there is kind of small.
And if you leave IT scratching your head a little bit like, oh, what's going on with this? I definitely suggest looking at the associated tutorials that are not only linked in there, but also, like I created the video course about decorators and give an idea of this function for wrapping around another function and that that being returned out of IT. So again, a closure memorization is another one.
We've talked about that in the past, this idea of sort of cashing things so you could prevent a function from running more than once. If you wanted to set something up like that, you can have IT say, okay, if you would, is the same input that i've received before, then just return this value or this function. So, interesting idea there.
He talks a little bit about in capsule. This is a hard word for me to say with closures. The idea there, like you'd like to prevent access to certain items. If you create something using object oriented programing techniques, he uses an example of creating as a class, that is, a stack, and having functions for pushing and popping items out of IT. The problem with that is that you can still access what should be inaccessible, things like the actual items in the stack, by just using a dot notation.
And so there's another way that you could do that and he gives an example of using IT in a is designed in a similar way, but you cannot access the individual items uh by building IT as a function with functions inside IT, he gives a little section about sort of alternatives to closures. And then it's a nice tour. I I don't know which ones of these that you typically use are in practice of using Christopher .
her that decorators mostly I think yeah, there's I don't do a lot of functional programing. It's not where my head naturally goes. I'm a prospect. First guy seems to be my natural way of doing algorithms, but there are cases where sometimes it's the right tool for the job.
Yeah so I like this is a nice tour of like, okay, what they are and how they kind of work and Price on but also a some examples of using the practice and each of them have a nice little code example with them to give you a tour. So thanks, bay. honest. What your first one.
my first article this week is called a state of python three thirteen performance free threats is by Arthur pestle, and he has done a deep dive on performance in your favorite language. He's written a short version of of the page rank algorithm m, which is what google originally used to decide the order of search drinking, depict this as its compute intensive as well as uses a fair amount of data.
This is important if you're measuring performance and threatened situations. This threads tend to be a Better choice when there's a lot of I O. So Arthur write several versions of the same algorithm, a single thread at one, a multi thread at one, and a processor or on.
He then uses pie tests to build out a test weet, and does sometimes. So you'll recall the python three thirteen has an experimental feature to remove the girl. L, this is a compiled time flags.
You have to have a special version of the interpreter to use IT. If you do have that flag compiled in, you can turn the gill on and off. And as the phrase no gill is on or off can be be confusing, because the double negative, this is known as the free threats version.
The free threat version is denoted with A T. So artha runs his three page rank difference in python three twelve thousand seven, and then three versions of three thirteen, one without the free threatened compiled in, and then two of those tea versions, one with the girl on and on, what to go off OK. So in single thread ded mode, three twelve and vanilla three thirteen performed similarly, with three thirteen being zero point zero four seconds faster at a total of one point for four seconds to do the test.
The two t variants are actually a little bit slower there, about point three seconds longer, clocking in at one point seven seconds. And I know point three doesn't sounds like a lot, but it's a twenty percent slowdowns. If you were doing larger loads, this would make a difference.
Since this is single thread, you wouldn't expect to speed up anyways as the whole point of t mode is threats improvements. The downside here is you are seeing a little bit of a performance drop because of team mode OK. But of course, this is something the core maintainers are planning on working on in future versions anyway.
So the next set of test runs those same foreign interpreters. But using the thread version of the program, interestingly, three of the versions are slower, so three twelve and three thirteen take one point eight seconds, which is twenty eight percent slower. So just by going into thread mode versus single threats mode, you're actually losing some performance.
And likewise, the tea version with the girl turned off is actually getting pretty bad at two point three seconds. Of course, that's not what you came here for, though i'm happy to say that the tea version with the gill off just smoke, the competition coming in at zero point four seconds totals. So that's a seventy percent improvement in and this is why we wanted get rid of the girl because that's a big leap yeah then the last set of tests is the multi processor version.
The pay rank algorithm does use the CPU, but it's more I O intensive. So it's not something you'd Normally choose multi processing for. And you'll see why when I start talking or you'll hear why when I start talking with resort.
You may want to look at the graph.
Yeah so three two thousand and three thirteen vanilla take almost twice as long as the single thread ded versions. So you're seeing a real hit here. And this is due to the overhead of responding new processes.
Somewhat worryingly, the tea versions with without the girl or horrific coming in at over six seconds. So that's almost five times as long. Granted, this isn't something that the t version has been optimized for yet.
And IT doesn't mean IT will always be this way, but IT does show you how complicated this kind of adventure is. Performance improvements for some folks may mean performance aggregation for others. And in fact, this is what has killed no bill projects in the past, is the improvements in one place were coming at two high cost in others. Author closes out by noting that none of the code takes advantage the substance interpreters features, which is yet another kind of wrinkle in all of this that might be worth investigating. So you're always hear things like faster and Better, and it's kind of nice to see the actual effects of these things in practice.
Yeah, I expect to see many more articles in this vain IT makes me think a little bit IT about kind of the dawn of the multi processor stuff. I was working in music at the time, and speed of processors was sort of capping out. And so we add a more, more processors, but a lot of code, you know, in this case with audio plugins, was written in a way, I guess, that he couldn't do exactly of these attempts of things.
They had this chart literally showing me all the different processors, and it's only using the first two. Like why is that not even bothering? And i'm guessing that as to do is like again, how code can be writing and how can take advances across IT.
It's you know one of the chAllenges in concurrency is always problems that are truly parallel as this usually means i'm doing you know, that I ve got this big chunk data, and I can chunk IT up into pieces, and I can process each one of those pieces. yes.
But fundamentally, you almost always have to do something single threats in order to chunk the data up, and then something single threats to take the pieces and we assemble them and there's a cost of that. So the game you get by doing things in parallel has to be significant. Otherwise the cost of splitting the problem up and we assembling IT may actually turn out that IT was .
just faster to do IT without yeah he talked about I O .
hitting that ork yeah and it's even without I american computations to have the same thing right? Like if i'm if i'm trying to brute force and algorithm and i've got several different major cities that i'm trying to run at the same time, I still have to decide how my chunking up that in memory and how I accessing all of that. And and yeah, it's h concurrency is very hard to get right and and that's without getting into you know the kinds of bugs that are high and bugs that show up when you're trying to code in that time space.
Yeah, definitely. Calling all python developers supercharge your next project with wind surf by odium, the first truly a gentle A I powered I D E designed to keep you in constant flow state.
Windsurf combines the best of both copilot and agent systems, incorporating all the features you love from the kodiak extensions, while also introducing cash gate, a multistep reasoning agent that has access to the tools, unprecedented context, awareness and insights to prior actions. This means less prompting and more coding. Ready to dream bigger, visit windsurf dot A I and try out tomorrow's editor today for free.
My next one is from Michael Kennedy. Yes, that Michael cannell from talk pizon. This is an article on his blog. I kind like this trend that Michael has over the years that he kind likes to work a little a bit in the open, showing people what he's doing.
Like I see conversations started on, so not working about I trying out this new S U methodology or i'm trying out this thing or whatever. And so this is kind of similar. I've i've seen him talk over the last month or so about this new hosting option, and I can't wonder where all this was headed.
And well, he wrote up as a blog post tear and he wrote a description of how he thinks about structuring sort of business applications. I feel that very often people think of a business some ways that it's always going to be this thing that's gonna blow up and be like way huge. You know, they are always looking for that viral moment that what things are gearing for.
But many businesses are going to have a sort of a steady sort of growth or decline or whatever or just some some sort of constant. It's it's pretty rare the things telex as nex or whatever. But I mean, that is feasible.
So he talks about this with this idea of what is the opposite of cloud native code dative. Is this idea of it's kind like the next level of microsoft, my opinion, like all these different things that you can build to support putting up a business application on the web. And he shows an example of that structure.
It's massive. It's like this big drawing with all the different types of things that are happening. I feel like this is common sort of laundry list of services from providers like a dos or as and the provides setting all that up and gives you an idea of what that might lead to as far as like monthly building or something like that.
And in the end, I might be leading to like around a thousand and ours a month or or something like that. He also shares a link to you like a horr story of of a particular one of these services, this thing called cara, that APP and IT literally did go viral. And in that particular case, with this sort of structure, they ended up with this insane monthly bill of, like ninety six thousand dollars a month.
The idea of sort of building for this really expandable set up, I think, is a little misleading. So he he's providing a new option that he's calling stack native. His quote is stack native is building your APP with just enough full stack building blocks to make IT run reliably with minimal complexity. He's trying to contrast IT.
The other kind of contrast that he has is like going back maybe a couple decades, how a company might build something in house, on premises, but you'd have physical servers in your business, you'd have all the internet wiring you have to be paying, and for a fairly large pie to an I S. P. Back up power system, someone to have a pager and jump in for support and so forth.
And the idea that was happening over the last two decades was that, okay, well, we're going na lift this and hosted somewhere else and duplicating that set up in the cloud and again, being a rather cost hibor way of doing things. So he details his particular simplified set up, flask being the sector that flat being managed by docker and potentially scaling up using web workers. IT could be run directly on A V M.
He has workers running with a like a whisky I W S G I python server and then a web APP exposed to the interview in genets. He talks about self hosted database, something like post grass or MongoDB, everything being open source, excluding the cloud at vm. And he buys like a medium size server.
He was using, I think originally, I think previously he was using something like digital ocean. But he recently switched to this new service called hetzer H E T Z N E R um, which I think it's new that they have U S. Based data centers.
And so they are german company that's now providing now the the us. resources. So he digs a little bit more into the details, shares some stats about the typical traffic his site skit.
And that is to say these are not toy example labs. He's hosting his whole business on this type of set up, not only the podcast that he does, but he does know training courses and so forth. So one of the big things is the band with bill.
And the difference in cost for that stuff is a tenth of that Price. So it's like closer to just over hundred dollars a month for what he's doing. I don't know if he's including the Price of where all the files are saved.
I'm guessing that maybe not included there if you're still using history, but it's interesting article giving an idea of like the changes of infrastructure from over last several decades, the a lure that is of cloud native in the danger that you can get into there. And he's hinting at making a course about this product structure and suggest staying tune to his blog for future development. I like how we included lots of links to knowledge, sort of stories like the horse story I mentioned, but other services to check out and other utilities. And he explained that is on certain concepts. So I appreciate the the linking that I definitely enjoy that part of IT.
He also just wrote a follow up as well, which is specifically on the transfer to her. Okay, so cool.
I'll put a link for that then um as an additional link.
Yeah it'll be in when this pocket comes out. IT will have been in last week's py cotters nice. I'm time travel.
Yeah yeah yeah. What would you go for us next? My next .
article is from regio hero is one of his things i've learned. Posts title python soft so our regular keyword python is a part of the language and text that can be used as a variable. For example, if you try to assign a value to a value or named, if you'll get a some text error as if is a keyword.
So a soft keyword is a still a keyword, but it's based on context. And you can actually use them as variables. But if you use them in the right way, then they're part of this index.
This has been done to help with backwards compatibility. If you add news cent text to the language, there's always a chance that, that keyword is a variable in somebody's older code and also you're going to break a bunch of stuff. So being a soft key word gets around this problem by thon three twelve has four soft key words.
Two of them are match and case, which were introduced in python three ten as per the structural pattern matching feature. Somewhat less obvious. But actually also associated with matching case is the underscore I use underscores all the time when a function returns to top, and I only want part of IT unpacking, part of a topple into another score work as a signal.
This say, hey, I don't care about this part. The underscores is also a part of the match case, peace being a specific case in structural pattern matching. So three of the four sort key words are actually magically stuff.
And then the fourth soft keyword was added as part of a python three twelve. And that's the word type. This is part of the typing system, which allows you to create type alliances. The article came out before three thirteen, and so the references are all about three twelve. But if you actually want to see what's of keywords, your various sports, you can do that by using the keyword module.
This module has a value called soft K W list, or one word no underscores that contains the list of soft keep are names python three thirteen has the same for that I just spoke about. So interesting, quick little article. I rod rego rights, great content. And in fact, he's got a lot of other stuff on his site as well, which I definitely recommend checking out.
爹。 This week, I want to shine a spotlight on another real python video. Of course, this covers a powerful concept in python and touches on one of the main topics. This week is titled python inner functions.
It's based on a real python article by layer on disposal almost and in the video course, Michael Christopher ado takes you through how to provide in capsule tion and hide your functions from external access, how to right helper functions to facilitate code reuse and create closure factory functions that retain state between calls. You also learn about coding decorator functions to add behavior to existing functions. I think it's a worthy investment in your time to learn how the nest functions inside other functions is a feature of python.
You'll see more often the further you explore the language unlike these features yourself and explore and capsule tion closures, decorators and much more real python video courses are broken in the easily consumable sections, and we're needed, include code examples for the technique, show all lessons, have a transcript including close captions. Check out the video course, you can find a link in the show notes, or you can find IT using the enhance search tool of real python dot com. Well, that takes us into our discussion this week.
And this week, we're returning to an article by vadim gravity co, and it's titled habits of great soft engineers. You might remember us talking about a couple points from that is a big list of habits. And this one we're focusing on, number three, which is the joy of tinkering, and might be one of my favorites from the list of habits.
The brief description he provides, bill projects, trial frameworks, build stuff on the side, keeps the Sparks alive. And in the longer section of the article, he shares the concept of passion. And a lot of people have passion for programing.
And what that means is there always kind of thinking about, like, like, how can I use this or are interested in new languages? Or I go, well, what is this? How does this work in this particular language? And how are they using that?
I know a lot of the court developers think about that often and think about ways of inserting that stuff into pile on other tricks, of keeping the Spark alive, giving you out of a rat, being curious, or just generally keeping your skills sharp. I think IT falls into, for me, definitely, the area of enjoying solving problems in in trying out new tools and seeing what can happen. I think there's a few different areas we can kind of explore here in air discussion of IT.
And I wondered about, for you particular Christopher, like what I kind of had three ideas like how people might approach tinkering. Uh, I think there are some people who like to tinker with an existing project of framework that they have in in that particular case, they White fork IT and then try out their experiments over there and and see what they can do with that or potentially pulling down other people's work in doing the same thing. I think there are other people that are more paris sketchbook type of people where they will create like a toy project that have probably very little purpose in their own life, but they want to try something out and they're just gonna explore and mess with the framework but are not necessarily gone to say that work or maybe they just keep IT in a repository that they no don't keep public, just like, okay, this is something that i'm just messing with code on here.
And then I think there are other people that create sort of finished micro projects, things that are very, very specific and maybe are scratching a very specific edge that they had. But as far as like the popularity of if they are as interested that they're much more interested in, just like I want to try this stuff out and feel tools there and then i'll explain later like my own kind of thing with this, where I fall in kind of sort of slightly different area. But I feel like based upon our conversation the past, I feel like you might fall in my third category there.
Yeah, definitely for python, I fall into the third category. The reason i'm being specific about the languages, okay, some of my approach to teaching has to with how much I know about the language because i've been doing python for, I think i'm almost i'm past the fifteen year mark.
I don't want I have to look IT up, but just I look, i'm all and so because i've got a fairly good grasp on the language, i'm finding I don't need the I wouldn't go to the arts sch book of thing as much. I tend to be I have a problem i'm trying to solve and so IT tends to be that kind of thing. Yeah, there's a fine line between tinkling and yacht shaving.
and I was wondered about that term and there's another term I know if that fits the same thing but a woodsheds .
or bike shedding ah their phrases generally meaning your you're playing with stuff where you're not really getting benefit out of IT. I think I really what IT comes down to, you're spending more time on the thing because you maybe because you're perfecting IT or because you're reorganizing IT and IT doesn't really need IT. okay.
I think all programmes are kind of prone to this somewhat, and I think in the tinkering space is more likely to happen. One of the libraries we've talked about before, i've got a little thing that is for visualizing, which I do with the courses. IT looks like i'm coding alive and i'm not.
It's like a little slide show, you think inside the terminal and it's built on top of a mostly defunct terminal library called erwin. It's working fine. I don't have to touch IT I in the background every once.
And while I want to try to get IT to a more modern underlying library, there is no reason to do that there. There's no feature i'm going to get out of IT. Yeah, you know, I might be able to write Better user tests, but I ve got a test harness is working.
So that's very much sort of the tinkering. That's like playing with another way of attaching the problem. And I know that and the hours i've soaked into that, the benefit i'm going to get out of IT is nothing in comparison to the amount of timeless taken. I also find sometimes this kind of stuff and it's it's procrastinating search of a solution. Okay, when I was writing the book, one of the chAllenges i've had in the past, I think the first time I ran into IT was for a course was one the gaming courses that I wrote where I had like five different versions because like you're just adding code, you're adding code and you're adding code, you end up with a different version in each version is separate for the students so that they can go oh, in lesson to this is what the code looks like in less than five. This is what the code books .
like because you're learning all these unique concepts that you have to start in .
and you don't want to leave them at just the end. Well, the problem is, if you find a bug in chapter ten, you have to go back and make sure you change IT in, although previous chapters. And so I knew this was gonna a chAllenge with the books. So I went and I wrote a tool that I can put basically comments into the code that indicate what version the master is, what what like, what chapter this chunk aot introduced into OK. And so then you run the script, and IT takes the final project and IT generates the chapters.
So if you've got a bug, and that in all, five chapters at you just changed in one place, and IT split into these tiny little pieces, the amount of time IT took to write that passes and get IT working and doing all of that was significantly longer than any bug fix that I would have ever had to put. But the flip side of is, IT IT did give me more confidence that if I did have to fix a bug, that I was going to get IT in all of the places because that's part of the fear is you're like o that bug was in chapter three and I didn't realize IT and I only fixed in four, five and six and and so there's a quality thing, listen to me rationalize, right? So yes, so some of some of the tinkering and problems solving types stuff with that kind of thing is all i've got a solution to this, but and maybe I shouldn't be doing IT, but it's interesting and it's a need little problem and and now i'm doing IT, right?
So and I have no of a few things like I get a lot of tinkering time in my job in the sense that every two weeks we pick up particular project to play with and we're going to discuss them this week. And every week or multiple times week, i'm checking out video courses and covering certain topics or potentially frameworks are other things. And so again, i'm kind of playing with them and learning them a little bit.
Or even on an tough week, i'm going to talk to somebody about this new tool that you know creating something in pye script. And so I have to play with IT a little bit. And so it's eating up a lot of my, I don't know, band with for tinkering in some ways.
And I feel like that happened sometimes that if you get into a job where this was like the fun hobby that you had, you were kind of checking stuff out and now you're doing IT for real zy, as your job by job is sometimes eats away. That and I I feel that sometimes, and then I have a secondary problem. I would argue that I I mentioned this often about this sort of like spoiling creative spirit.
But I, for a long time, I wanted to be a recordings engineer. Mostly I learned all those skills to record my own music, and occasionally I got to collaborate with people, and I worked. I guess I don't talk about this often, but I I worked on tire skip sons, like first album, have a plant record, you know, because of working on that album.
And IT was the best experience i've had in my life. I worked with a particular producer, this guy, dear Allen, and he was very collaborative. Like I said, try this sound.
He's looking for this. okay? We'll try this instrument. He would try out this particular instrument that I owned. Oh, you should really use this particular effect pedal. And IT was super collaborative.
And if I could have had that relationship going forward, I would have stayed in this thing and probably would be more of a recording engineer than I am now. I ended up moving on and becoming a teacher in recording engineering. And it's partly because the other ninety percent of the time when I was working that job, I was working on music of projects that really weren't very good.
Let long, great and IT was painful. IT was almost a sacred religious to me to put all this effort in time and so forth, into something that I would never want anybody know that I worked on, which I know is like, maybe mean or awful of me as a human being. But like, I decided I don't want to be in that career. So it's mental energy.
No, it's it's mental energy, right? You you can. There's always some.
And I always find, I always find talking about this kind of funny, right? Because like I am fully aware of the fact that being mentally tired is nowhere near being physically tired. Like it's a White collar first world problem. You have up.
You know, I look at what what my grandparents did for a living and is like, yeah, okay, I they would have found me that in a field already, right but that being said, there is there is a mental thing. There's an exhaustion that comes with IT. And uh, you know if you're not there, you you've got to find some way to reduce IT tinkering in projects.
Sometimes rejuvenates that right? It's like so sometimes it's a hey, this is this isn't the crappy code i'm working on in my daytime jobs. So now i'm trying to to solve a problem that's a little different.
I often find, you know, the one of the explanations between extroverts and introverts is that, you know, extrovert to somebody who gets energy from people in an introvert s you know, they can, they can enjoy interacting with people, but it's tiring. And and I think the tinkering, there's programmer, so it's like, no, i'm done. I can't I can't look at another one of code and then there's other programmers. It's like, oh, as long as i'm not looking at that code, this code is interesting and I started of that introversion. You know, it's the extra version equivalent and right this i'm getting energy from playing .
with this yeah I feel like I can take that metaphor even further that I feel like the Spark often for me, i've said this another context, but it's just it's tied to collaboration and I think that's what my fascination with open sources, even though i'm stop not jumping in with both feet there are basically trying to find the projects that I want to do IT.
But I feel that that sort of back and forth is something that I I like in creative pursuits. And I wonder sometimes if there's other ways outside of maybe you know out open source or what have you kind of play with IT like I I thought that a maker space would be more like that for me for like h electronics projects and things like that, that I would be you know able to kind of talk to people warm and so forth. And IT didn't quite turn out that way for me.
I course I didn't spend that much time expLoring IT, but I feel that coating is so often a solo thing. And when i'm trying to learn something brand, brand new, like when I was trying to learn equal, or trying to learn what programming in java, a script or my very first stuff with python, IT was a black, a boundless energy. And then, you know, when that becomes a job, IT becomes something slightly different.
And so it's like that is a trick of being a great programmer is like, okay, wall, how do you keep the Spark going? Speaking of stuff that keeps your interest going, we got some projects this week. I I found a project that is by seven Wilson, and there's a bunch of other collaborating on this particular project.
And I know I seem to be all about scraping the web lately, but this one is slightly different. It's called shot dash scrapper. It's a command line utility for taking automated screen shots of websites. Think you trying to stick together pictures of the entire page of website going from top all the way you could scroll to the bottom, kind of like that ridiculous receipt you might get from cvs.
You know, the ones you could dig into a bag that you could maybe Carry your items out into anyway, this, does that automatically, ally, and I love this project right away because he was really easy to install, and IT even requires a bit of additional tools that would be some like work for you. Simon s built in this install command that installs the chromium tool and play right. And all these are the kind of stuff to go with IT, which is great.
And this default action just does that IT described. S the page of whatever website you enter into IT. You can choose whatever site you want. In this case, I tried IT with his example site. I love the tutorials on this thing that really well done.
But I, when I did want for real python and had made a big list of the front page, from there, you can say, okay, I want just these headings. I want just these areas really great documentation. I mean, just look at this project for like how you should organize documentation.
It's really, really well done. I was very impressed with IT again, the good tutorial, a section on how you can use IT with websites that need authentication. He has and actually built a little toy authenticated site on his own that you can then practice with that, which you I love that about the tutorial.
So very, very thorough. Impressed with IT. And if this is something you need to do, I have bought screen grabbing utilities that trying to do this sort of automatically for you. And this one just is way more controllable from the command line.
Do you want to output as A P, D F? Do you want to output as this image here? What sort of boundaries of pixel do you honest for as a witten height and so forth? So impressed by the project shot scrapper. I think that .
just sort brings us back to that tinkering thing. The difference between tinkering and producing the libraries, just how many people like IT Simon seems to tinker and the world seems to go, oh, i'll have that. Thank you. And yeah.
seems to get lots of collaborator.
So invents a project.
Yes, exactly. So good for him.
yes. So my turn. Yes, okay. So few weeks back in episode one ninety eight, wow. Time flies. How cow. I talked about the jingo tui, which was a terminal user interface program for the commands that you can run from within your jo project.
This week I ve got a project that was inspired by that one called jungle admin to e and it's by the year, velva gu monson. Normally, the jangle admin is a web based tool for managing your R M objects that you have in your project. This library is, uh, tweet for the same thing.
It's kind of hard to say a lot about this project as it's exactly what IT says IT is you pip install IT at IT to your insult apps listing. And then there's a new command called admin to when you run that you get a textual interface that's identical to the web experience. IT has three pains, one for the listing of your kinds of objects, one for controls like the ad object button, and one for the listing of your objects that you're looking at in the tree.
Something I find interesting about this approach is that could allow you to be much more paranoid about your web in your face. You could block the admin web pages for your site and still be able to use the tool, but only if you're log into your server. So that might be sure if your security conscious, this would be another way of locking things down and not giving up this feature from janko.
So need little tool. Well, i'm on the topic of jingo admin tools. Uh, also want to give a shot out to jane admin jaculation by sanguinea jet won anon and if you're tired of the default jane admin, look, this is a dark mode tracking lar theme.
Once you pip install IT, you add IT to your installed apps listing above the contribute admin line. And there you go. You've got dark mode, horrible translate, ian acts and purely optional.
very nice. Do you see yourself using something like the two e one? Um do you think that would be handy? Trying to think of circumstances where you would maybe not have the web ener fact that I might be more light weight. I'm trying to think of yeah so so if you were .
doing work on a server that you wanted to be down for some reason, this would allow you to be able to essentially get at your programmatic things for your database same way with the web interface. Without the web there, I could see IT possibly being helpful, like if you're setting a brand news site up. So for example, all often i'll go in and i'll put something in and all have a new subdomain.
IT hasn't gone through yet. And you want to test that things are working properly, and you want to put something in the database and use the webs, not there yet. And so I have this tool there.
You'd be able to play with IT without the web until the web thing had been fixed. It's more as with a lot of the textual stuff. I think IT always comes back to can you or yes, you can all right, whether or not how many people find that useful, whatever but it's it's an interesting .
idea yeah I well, thanks for bring all these news items, topics and projects this week again from py cotter, Christopher. See in a couple weeks actually click up to a did you get any additional a submissions from our called action earlier?
It's hard to know. Uh, you IT is some weeks I get lots and some weeks I don't. So maybe okay, the dry spell has lifted. I don't want to say causation yet. So we keep him coming.
Yeah, yeah. definitely. I'll called the link again for subsides at the bottom of the showed tes. So please check out your showing tes next.
And don't forget to check out the wind surf editor, the next generation and A I powered ids, visit wind, serve that A I to learn more, and try out the world's first agented editor for free. I want to thank Christopher e. Trudeau for coming on the show again, and I want to thank you for listening to the real python podcast.
Make sure that you cook that follow button in your podcast player, and if you see a subscribe button somewhere, remember that the real python podcast is, if you like the show, please leave us a review. You can find show notes with links to all the topics we spoke about inside your podcast player or at real python dot com slash podcast. And while you're there, you can leave us a question or a topic idea. I've been your host, Christopher aling, and look forward to talking to you soon.