Skip to content

Commit d296595

Browse files
authored
Merge pull request mikeckennedy#225 from talkpython/master
sync back some changes
2 parents a065a29 + c3a2c09 commit d296595

40 files changed

+31847
-65
lines changed

transcripts/325-circuitpython-and-micropython.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@
7070

7171
00:20:34 But even down to things like how division of modular work with negative numbers is sort of very specific, you know, when you have A modular B and the negative numbers, then the answer is a certain way. And micro Python copies that as well. So there's a lot of subtleties there that you may not realize that over the years, we've gotten to make sure it's right same with CPython, just because we've got a lot of tests and a lot of people giving feedback when it's not exactly as they expect. Yeah. And yeah, I mean, I definitely learned so much about CPython. And well, the Python language, because so many things, I had no idea about, like, well,
7272

73-
00:21:08 you had to get the exact nuanced details of how this thing or that thing works right here, make sure it's the same. One of the things that I think is worth keeping in mind is people think about this as when somebody says, I love Python, or I think Python works this way, or Python is this thing, and it's productive, or it's whatever, it's slow, it's fast. They often can be talking about many things. Somebody could say, I love Python, and they mean the Python syntax. Somebody could say, I love Python, the reg of the standard library is so cool that it comes with all these things in the standard library. They could mean I pip installed Pandas and request and now something cool happened. Yeah, right. When when you say Python runs there, there's like, you kind of gotta say, Okay, well, what are we talking about? Right? Are we it? Mostly the language for sure. But there's got to be a ton of standard library things that don't make sense. Like there's this one about parsing CSS, hex values, like who cares? TK enter? Don't care. Yeah, SQL Lite. Maybe? I don't know.
73+
00:21:08 you had to get the exact nuanced details of how this thing or that thing works right here, make sure it's the same. One of the things that I think is worth keeping in mind is people think about this as when somebody says, I love Python, or I think Python works this way, or Python is this thing, and it's productive, or it's whatever, it's slow, it's fast. They often can be talking about many things. Somebody could say, I love Python, and they mean the Python syntax. Somebody could say, I love Python, the reg of the standard library is so cool that it comes with all these things in the standard library. They could mean I pip installed Pandas and request and now something cool happened. Yeah, right. When when you say Python runs there, there's like, you kind of gotta say, Okay, well, what are we talking about? Right? Are we it? Mostly the language for sure. But there's got to be a ton of standard library things that don't make sense. Like there's this one about parsing CSS, hex values, like who cares? Tkinter? Don't care. Yeah, SQL Lite. Maybe? I don't know.
7474

7575
00:22:04 Yeah, I was gonna say I did actually do like lightning talk at the last language summit kind of on this topic. And like Damien's saying, like, to his credit, Micro Python, is Python in the core syntax areas in the built in types. But as you kind of grow outwards into like, the standard library, things get omitted a lot. Because the frankly, the standard library in CPython is large. Yeah. And so I did kind of a comparison there. And I can share people with the slides. But like, take all this stuff in CPython and show what's in in Circuit Python. That's cool. I've been having like discussions off and on with Brett Canada about this as well, because he's been thinking about, like, how would you define like a minimum version of Python. And I think that Micro Python did such a great job of that. It feels like Python to me. I had the background in Python before. So like coming to Micro Python, it felt very natural. So I think we're a good case for that.
7676

transcripts/326-wxpython.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
00:01:41 Mike, welcome to talk Python me know. Thanks so much for having me again. Yeah, it's great to have you here. Maybe you can just remind people of the last time you are here. You wrote a really cool book called I think it was 'Python Interviews'. Is that do I have the title, correct? Yes, that's correct. Yeah. And that was back in Episode 156. Way back in 2018. like three years ago, I guess more than that. But it was a history book. So it was looking back, right. It's fine. It's still relevant. People can check that out. And I really love some of the stories that you told on there. I love. I think it was Alex Martelli. you interviewed him and talked about how Google Video and YouTube are sort of competing neck and neck. And that was sort of a Python versus C++ story. That's probably the one that stuck with me the most. Yeah, I really enjoyed that one, or that does some good stuff in the Brett cannon interview as well. Yeah, there's a great stuff all over. I'm just trying to think of the one that I remember years later, you know, yeah, yeah. So it's been a couple years since you've been on the show. What do you been up to? Well, since that book came out, I have been pretty prolific in my writing and continue to write more Python books. For example, I've written one on 'wxPython', and 'Report Lab'. I redid 'Python 101', which was my first book, and Report lab is about like working with PDFs, right. Yes, you can use it to create PDFs, edit, but that book also covers how to edit options, edit, how to read and get data out of an existing PDF as well. Yeah. You got a couple of 101 201 type books as well. Yeah, like Learning Python? Yep. Python. 101 is for beginners and 201 is kind of intermediate advanced. So if I was like, a sophomore might take that, yes. Cool. So what are you doing these days? Are you doing the independent thing with your authoring and creating? Are you doing consulting? What do you do? Oh, I still would do a full time job. I write Python code that tests an embedded C++ application with Python. Oh, nice. It's really neat. But I also you know, kind of as a hobby slash side job I write for myself, I write, I write these books. And I occasionally contribute to real Python as well. A lot of good stuff going over real Python, Dan, and crew keeps that content flowing over there for sure. Yep. Yeah, absolutely. So, we're gonna talk about building GUIs. Or GUIs as some people say them? I know I'm okay. Are you a GUI? Are you a GUI sort of person? I usually call it GUI. Yeah, me too. So we're gonna talk about those for Python, which I think is interesting, because there are a have been, there are decent options. But it's not a place where Python has traditionally received a ton of focus and energy on building a lot of these frameworks have to do with taking another framework. That's a nice cross platform framework and like making it friendly for Python, right? I'm thinking of like, yeah, cute, or even wxPython, right? Yeah, it's usually a C++ wrapper that pre existed Python, and then it got wrapped with bindings of some sort. Yeah, exactly. A lot of these, especially the ones that do native widgets. Those are really just wrappers over the operating system when doing API's, right, like WIN 32 or is it COCO on macOS, those kinds of things. Right. So it's like some thin layer than some adaption adapting thing for Python. Right? Yeah, I think there's only a handful that aren't wrapping.
88

9-
00:05:00 something else like be Where's toga? I don't believe is wrapping the native. I'm trying to look at it as I guess it is wrapping in a way, but it's not wrapping a pre existing framework. Right? Right. It's probably super low level, like here is a literally create a window that has a button. And that's it like, not like cute or something cute. Yeah, I think toga is actually like, you know, trying to render the cocoa widgets or the win 32 widgets itself, you know, rather than calling like Q2 or wx. Yeah, there's some value to that there's some value to that. So I thought the place that we could start is maybe a survey of these different libraries that we could use. Sure. Right. And so let's start with Tinker 'tkinter', which is really the Python interface to TCL/TK, right. Yeah, so this one comes built in. Right. I'm here on the Python 396 documentation. And I guess this is the official way to create GUIs with Python, right. I mean, in the sense that it ships with it, it ships with it, however, on like Linux, that the system Python does not come with. Okay. So you still got and I believe, I believe Mac is the same way you have to install it separately for it's just on Python two. Yeah, that wouldn't surprise me. Well, you know, the system, Python and Mac is all sorts of outdated and yes was basically right, like 27. Who knows what, right. But yeah, but it's always surprises me when I go to import t Kenter. And it's like, oh, it's not there. Like what? Yeah, exactly. Tell us about this one. Like, what's the good side? When would use it? Or would you use it when wouldn't use it? I don't like it because it looks a little old fashioned. But mainly because it draws all its own widgets, just like some of the other GUI toolkits. So basically, when you create a T kinter GUI, you know what the tkinter because it doesn't look native. However, you can use a TK enter, the code can be written without classes, you could write it completely functionally, and still make your work. So you know, as a learning way to create a GUI, it might be a good first, you know, a good beginner our first GUI to create with. Yeah, absolutely. Yeah, I put up on the screenshot screen for us to see there's like this TKinter Hotel Management System, it definitely doesn't I didn't see the top bar. I couldn't tell you what OS that's from. But because it doesn't look like OS that I know, right? Although, there's another example. I'll put these in the show notes. There's a pretty nice one that's hosting some kind of like predates Jupyter or something like hotels matplotlib exploration and stuff. And that looks like a pretty solid app to me. Yeah. tkinter did add a sub module called TTK, which does look a lot more native across platforms. You can make it look nice actually, if you if you spend the time, but you're going to have trouble finding good examples online because a lot of them just use the old the old interface. Another one thing I do want to note about TKinter is it's themable. So if you want it to look new, you want to add themes to your, your GUI, your ticket is an option for that. Oh, interesting things. So for example, you could give it a macOS like theme that turns on in that platform and a Linux theme maybe mode and not dark mode. Yeah, I was thinking of dark modes light modes be giving them a certain you know, color things kind of like a win amp type of skin. Yeah. Oh, man. Remember that? How crazy those skins would get. They'd get like 3d with little holes cut in. And yeah, that stuff got that got a little drawers like an alien tongue would shoot out and that's where like the playlists don't do that people don't do that. Okay, so for the most part TK inter is built in ish least it's sort of somewhat officially part of Python, right? Yes, it is another one one that I think of a lot when I think a cross platform stuff is cute. PyQt
9+
00:05:00 something else like be Where's toga? I don't believe is wrapping the native. I'm trying to look at it as I guess it is wrapping in a way, but it's not wrapping a pre existing framework. Right? Right. It's probably super low level, like here is a literally create a window that has a button. And that's it like, not like cute or something cute. Yeah, I think toga is actually like, you know, trying to render the cocoa widgets or the win 32 widgets itself, you know, rather than calling like Q2 or wx. Yeah, there's some value to that there's some value to that. So I thought the place that we could start is maybe a survey of these different libraries that we could use. Sure. Right. And so let's start with Tinker 'tkinter', which is really the Python interface to TCL/TK, right. Yeah, so this one comes built in. Right. I'm here on the Python 396 documentation. And I guess this is the official way to create GUIs with Python, right. I mean, in the sense that it ships with it, it ships with it, however, on like Linux, that the system Python does not come with. Okay. So you still got and I believe, I believe Mac is the same way you have to install it separately for it's just on Python two. Yeah, that wouldn't surprise me. Well, you know, the system, Python and Mac is all sorts of outdated and yes was basically right, like 27. Who knows what, right. But yeah, but it's always surprises me when I go to import t Kenter. And it's like, oh, it's not there. Like what? Yeah, exactly. Tell us about this one. Like, what's the good side? When would use it? Or would you use it when wouldn't use it? I don't like it because it looks a little old fashioned. But mainly because it draws all its own widgets, just like some of the other GUI toolkits. So basically, when you create a T kinter GUI, you know what the tkinter because it doesn't look native. However, you can use a Tkinter, the code can be written without classes, you could write it completely functionally, and still make your work. So you know, as a learning way to create a GUI, it might be a good first, you know, a good beginner our first GUI to create with. Yeah, absolutely. Yeah, I put up on the screenshot screen for us to see there's like this TKinter Hotel Management System, it definitely doesn't I didn't see the top bar. I couldn't tell you what OS that's from. But because it doesn't look like OS that I know, right? Although, there's another example. I'll put these in the show notes. There's a pretty nice one that's hosting some kind of like predates Jupyter or something like hotels matplotlib exploration and stuff. And that looks like a pretty solid app to me. Yeah. tkinter did add a sub module called TTK, which does look a lot more native across platforms. You can make it look nice actually, if you if you spend the time, but you're going to have trouble finding good examples online because a lot of them just use the old the old interface. Another one thing I do want to note about TKinter is it's themable. So if you want it to look new, you want to add themes to your, your GUI, your ticket is an option for that. Oh, interesting things. So for example, you could give it a macOS like theme that turns on in that platform and a Linux theme maybe mode and not dark mode. Yeah, I was thinking of dark modes light modes be giving them a certain you know, color things kind of like a win amp type of skin. Yeah. Oh, man. Remember that? How crazy those skins would get. They'd get like 3d with little holes cut in. And yeah, that stuff got that got a little drawers like an alien tongue would shoot out and that's where like the playlists don't do that people don't do that. Okay, so for the most part TK inter is built in ish least it's sort of somewhat officially part of Python, right? Yes, it is another one one that I think of a lot when I think a cross platform stuff is cute. PyQt
1010

1111
00:08:45 PyQt. There's been a lot of different versions of PyQt. They're like a lot of stuff in licensing so like right here on the homepage. It says licensing PyQt has dual license on all the platforms under GPL 3 and the riverbank commercial one. Unlike PyQt is not available under LGPL, which is I guess what you would need for like a commercial closed source app. And there's, there's another wrapper around Qt. That I think is lgpl. Like the there's a lot of stuff that's just like, Well, why is it so complicated? Yeah. PyQt is kind of confusing when it comes to its licensing structure. Yeah, she's crazy, because I've had this conversation multiple times. And it seems like it I don't know it either. It never resolves clearly in my mind, or it's just challenging. But that said, there's really nice apps built with Qt. So for example, like one of the database tools I use for working with MongoDB is Robo 3T. And if you look at Robo 3T this thing is glorious in terms of its sort of native look and feel like if you go to the robomongo.org scroll down for the screenshots. There's the three OSS, side by side and every one of them looks like it belongs on that platform, right? Yeah, you can get a little bit simpler with instead of using PyQ, you could use Qt
1212

transcripts/408-hatch.vtt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5345,7 +5345,7 @@ And then the same day, maybe the next day, I forget who, but somebody in the
53455345

53465346

53475347
00:57:51.080 --> 00:57:57.280
5348-
discord was asking if I wanted to join the Pipey and I was like, well, sure.
5348+
discord was asking if I wanted to join the PyPI and I was like, well, sure.
53495349

53505350

53515351
00:57:57.280 --> 00:57:58.240
@@ -5369,7 +5369,7 @@ Oh yeah.
53695369

53705370

53715371
00:58:12.720 --> 00:58:15.000
5372-
And it's also under the GitHub organization of Pipey.
5372+
And it's also under the GitHub organization of PyPI.
53735373

53745374

53755375
00:58:15.000 --> 00:58:15.440

transcripts/414-startup-row.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -858,7 +858,7 @@
858858

859859
00:29:41 - Wow, so where's it run?
860860

861-
00:29:42 Is this a PyScript, Pyodied, is this scoped, is this Docker on a server?
861+
00:29:42 Is this a PyScript, Pyodide, is this scoped, is this Docker on a server?
862862

863863
00:29:47 - It's all running in a Docker container, server side.
864864

transcripts/414-startup-row.vtt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3261,7 +3261,7 @@ you just import requests and go for it.
32613261

32623262

32633263
00:29:42.840 --> 00:29:45.960
3264-
Is this a PyScript, Pyodied, is this scoped,
3264+
Is this a PyScript, Pyodide, is this scoped,
32653265

32663266

32673267
00:29:45.960 --> 00:29:47.880

transcripts/418-secrets.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@
176176

177177
00:07:05 >> Okay. Well, very interesting approach.
178178

179-
00:07:06 I think one of the things that's held me back from going, "Oh, I'm going to use TK enter or GDK or whatever." It's just like, "Oh, but it just doesn't really look like it belongs here that much." It looks like it belongs here, but not really.
179+
00:07:06 I think one of the things that's held me back from going, "Oh, I'm going to use Tkinter or GDK or whatever." It's just like, "Oh, but it just doesn't really look like it belongs here that much." It looks like it belongs here, but not really.
180180

181181
00:07:20 Some people don't mind that.
182182

transcripts/418-secrets.vtt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -653,7 +653,7 @@ I think one of the things that's held me back from going,
653653

654654

655655
00:07:09.740 --> 00:07:13.100
656-
"Oh, I'm going to use TK enter or GDK or whatever."
656+
"Oh, I'm going to use Tkinter or GDK or whatever."
657657

658658

659659
00:07:13.100 --> 00:07:14.660

transcripts/422-how-data-scientists-use-python.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
00:00:10 Why is that? And what are the benefits as well as the pitfalls of this separation?
44

5-
00:00:14 That's the topic of this conversation with our guest, Dr. Jody Burchill, data science developer advocate at JetBrains.
5+
00:00:14 That's the topic of this conversation with our guest, Dr. Jody Burchell, data science developer advocate at JetBrains.
66

77
00:00:22 This is Talk Python to Me, episode 422, recorded May 31st, 2023.
88

@@ -748,7 +748,7 @@
748748

749749
00:44:33 Yeah.
750750

751-
00:44:33 JupyterLite, take Pyodied, which is CPython running a WebAssembly, and then build a bunch of the data science libraries like Matplotlib and stuff in WebAssembly.
751+
00:44:33 JupyterLite, take Pyodide, which is CPython running a WebAssembly, and then build a bunch of the data science libraries like Matplotlib and stuff in WebAssembly.
752752

753753
00:44:44 And then the benefit is you don't need a complex server to handle the compute and run arbitrary Python code, which is a little sketchy.
754754

transcripts/422-how-data-scientists-use-python.vtt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Why is that? And what are the benefits as well as the pitfalls of this separatio
1313

1414

1515
00:00:14.960 --> 00:00:19.280
16-
That's the topic of this conversation with our guest, Dr. Jody Burchill,
16+
That's the topic of this conversation with our guest, Dr. Jody Burchell,
1717

1818

1919
00:00:19.280 --> 00:00:21.600
@@ -2973,7 +2973,7 @@ Yeah.
29732973

29742974

29752975
00:44:33.520 --> 00:44:39.400
2976-
JupyterLite, take Pyodied, which is CPython running a WebAssembly,
2976+
JupyterLite, take Pyodide, which is CPython running a WebAssembly,
29772977

29782978

29792979
00:44:39.400 --> 00:44:42.820

0 commit comments

Comments
 (0)