WEBVTT

00:00:00.001 --> 00:00:04.240
This is Python Bytes, Python headlines and news delivered directly to your earbuds.

00:00:04.240 --> 00:00:09.180
It's episode 9, recorded Tuesday, January 17th, 2016.

00:00:09.180 --> 00:00:11.780
This is one of your co-hosts, Michael Kennedy.

00:00:11.780 --> 00:00:14.220
I'm here with my other co-host, Brian Okken.

00:00:14.220 --> 00:00:15.200
Hey, Brian, how's it going, man?

00:00:15.200 --> 00:00:16.680
It's going very good. How are you?

00:00:16.680 --> 00:00:22.640
I'm doing well. I always look forward to our weekly chat about cool stuff going on in the Python ecosystem.

00:00:22.640 --> 00:00:27.380
And I see that you found something quite cool for our first item.

00:00:27.380 --> 00:00:29.260
Actually, it's a series of things.

00:00:29.520 --> 00:00:34.280
The link that we have is to Python asynchronous IO walkthrough.

00:00:34.280 --> 00:00:35.840
And here's the story.

00:00:35.840 --> 00:00:41.020
So in July, there was an open source book published called 500 Lines or Less.

00:00:41.020 --> 00:00:44.660
The Architecture of Open Source Applications is the website.

00:00:44.660 --> 00:00:50.180
But they do various open source free books, which is pretty cool.

00:00:50.180 --> 00:00:59.480
Anyway, the 500 Lines or Less had one chapter in it from Jesse Giro Davis and Guido Van Rossum.

00:00:59.480 --> 00:01:02.820
called A Web Crawler with AsyncIO Coroutines.

00:01:02.820 --> 00:01:11.060
And it's a pretty cool chapter about explaining asynchronous networking, showing how non-blocking sockets work,

00:01:11.060 --> 00:01:15.860
and how Python 3 coroutines improve asynchronous network programs.

00:01:16.240 --> 00:01:16.860
Yeah, that's really cool.

00:01:16.860 --> 00:01:17.120
Yeah, that's really cool.

00:01:17.120 --> 00:01:19.460
I think that that book is amazing.

00:01:19.460 --> 00:01:21.640
It's not just this particular chapter.

00:01:21.640 --> 00:01:22.520
There's many chapters.

00:01:22.520 --> 00:01:28.880
It's also not just Python, but it has a heavy, a lot of pieces which are Python.

00:01:28.880 --> 00:01:35.320
And basically, it's, can you show me something amazing that really, I thought was really hard,

00:01:35.400 --> 00:01:40.100
how it can be explained or written in 500 lines or less, and then discuss the architecture.

00:01:40.100 --> 00:01:43.460
And there's like 20 different projects or something.

00:01:43.460 --> 00:01:44.320
It was very cool.

00:01:44.320 --> 00:01:47.320
Yeah, and the series is pretty neat.

00:01:47.320 --> 00:01:49.420
So this is 500 Lines or Less.

00:01:49.420 --> 00:01:55.740
There's previous books that are like about architecture and about performance issues.

00:01:55.740 --> 00:01:58.200
And it's a neat thing they're doing.

00:01:58.200 --> 00:02:05.020
But this particular chapter for me, since I'm kind of new to the asynchronous world,

00:02:05.020 --> 00:02:07.700
it still was a little bit heavy to get into.

00:02:07.700 --> 00:02:11.520
And so Philip Guo, who I think he interviewed you once.

00:02:11.520 --> 00:02:16.660
Yeah, he's been on my show on Talk Python To Me on episode 22.

00:02:16.660 --> 00:02:19.740
And I also was on his show.

00:02:19.740 --> 00:02:21.220
He started a podcast recently.

00:02:21.220 --> 00:02:23.560
It's got like 25 episodes or something.

00:02:23.560 --> 00:02:25.380
And yeah, I'll be sure to link to that.

00:02:25.380 --> 00:02:26.880
That's a really cool one as well.

00:02:26.880 --> 00:02:30.840
He interviews people just kind of generally in the programming space.

00:02:30.840 --> 00:02:32.960
So what he did was, it's pretty cool.

00:02:32.960 --> 00:02:38.280
He just is walking through this article and talking about it and then also,

00:02:38.280 --> 00:02:43.000
and showing it on video, and then also going through and doing some code examples.

00:02:43.000 --> 00:02:47.380
And he split, it's about 90 minutes total to get through this,

00:02:47.380 --> 00:02:49.120
but he split it up into eight parts.

00:02:49.120 --> 00:02:52.480
So each one is really not that hard to get through.

00:02:53.180 --> 00:02:55.520
And it's a pretty cool idea.

00:02:55.520 --> 00:02:56.680
And I really appreciate it.

00:02:56.680 --> 00:03:04.600
I think it's a good way to learn, to see somebody doing it, to hear them, to use all your senses.

00:03:04.600 --> 00:03:05.560
I really like that.

00:03:05.560 --> 00:03:06.960
I think this is great work.

00:03:06.960 --> 00:03:07.840
Nice work, Philip.

00:03:07.840 --> 00:03:08.540
Way to go.

00:03:08.540 --> 00:03:10.280
He's done stuff like that before.

00:03:10.520 --> 00:03:19.120
The reason I had him on episode 22 of Talk Python was he did this thing called CPython, a 10-hour code walk,

00:03:19.120 --> 00:03:24.360
which was like an exploration through the CPython internals, which I found really enlightening.

00:03:24.360 --> 00:03:29.340
And we actually, I talked to Jesse about his article on episode 69 as well,

00:03:29.340 --> 00:03:32.220
when we talked about writing as a developer.

00:03:32.220 --> 00:03:38.000
He's got some really cool thinking around, like design patterns on technical writing and stuff.

00:03:38.080 --> 00:03:40.000
So this is really cool.

00:03:40.000 --> 00:03:46.840
I think seeing a problem unfold before your eyes in code is much different than seeing the finished product discussed.

00:03:46.840 --> 00:03:49.340
And I find I learn really well that way.

00:03:49.340 --> 00:03:50.920
So I'm happy this is here.

00:03:50.920 --> 00:03:53.040
I haven't had a chance to go through it, but I'm looking forward to it.

00:03:53.420 --> 00:03:59.460
And also, both Jesse and Philip are doing some cool things to help the entire community, which I appreciate.

00:03:59.460 --> 00:04:02.800
Jesse's been supportive of a lot of people, including me.

00:04:02.800 --> 00:04:03.520
Yeah, absolutely.

00:04:03.520 --> 00:04:04.700
Jesse's doing great stuff.

00:04:04.700 --> 00:04:07.200
Do you want to think about the future of Python a little bit?

00:04:07.880 --> 00:04:12.520
I thought I was thinking about the future of Python with switching to 3.6 recently.

00:04:12.520 --> 00:04:15.400
So, but what do you think the future has in store?

00:04:15.400 --> 00:04:22.300
We were living like right on the edge of the front wave, but there's an article I thought was pretty interesting.

00:04:22.660 --> 00:04:28.280
I don't necessarily agree with everything, but I felt that it was certainly, you know, thought provoking.

00:04:28.280 --> 00:04:38.940
A guy named Sirdar Yagulap, I'm sorry, I'm sure I messed up your name, wrote an article and it's called Four Likely Future Twists for Python.

00:04:38.940 --> 00:04:40.940
And I thought that was pretty cool.

00:04:41.300 --> 00:04:43.180
So, let's go through the four twists.

00:04:43.180 --> 00:04:51.680
The first one does not make me happy, but is certainly something that I can see coming into existence as a thing.

00:04:51.680 --> 00:04:52.560
So, we'll see.

00:04:52.560 --> 00:04:56.980
But the first one that they put out there is that Python 2x may live on.

00:04:56.980 --> 00:05:00.360
Yeah, I actually can see that this might happen.

00:05:00.360 --> 00:05:03.780
I mean, it's an open source project, so there's nobody stopping you from doing it.

00:05:03.780 --> 00:05:08.100
The thing that's going to make the difference is what do the core developers do, right?

00:05:08.100 --> 00:05:13.880
So, right now the core developers are all focused on making sure that we make Python 3 as great as possible.

00:05:13.880 --> 00:05:15.660
And they're putting their energy into it and so on.

00:05:15.660 --> 00:05:19.100
So, I think Python 3 is certainly the right place for people to be.

00:05:19.100 --> 00:05:21.200
But I can see like large banks.

00:05:21.200 --> 00:05:23.060
You know, you think of places like Bank of America.

00:05:23.060 --> 00:05:31.100
They've got, gosh, I don't remember the exact stats, but I was talking to Mahmoud Hashemi from one of the Enterprise Python episodes I did.

00:05:31.100 --> 00:05:36.280
And it's something like the number of lines of Python 2, I don't even think it's 2.7.

00:05:36.280 --> 00:05:39.000
It's like 2.6 or 2.5 code is in the millions.

00:05:39.000 --> 00:05:42.560
Like 5 million lines of codes or something crazy like that.

00:05:42.560 --> 00:05:48.640
I can see a company like that forking Python and just making some kind of ongoing effort.

00:05:48.640 --> 00:05:51.800
Supporting your own Python, that just doesn't sound fun.

00:05:51.800 --> 00:05:53.660
It sounds like a really bad idea.

00:05:53.660 --> 00:06:00.140
I would much rather people just upgrade and we can all work together and live together and do great stuff.

00:06:00.140 --> 00:06:01.040
Here's one of the predictions.

00:06:01.040 --> 00:06:05.820
That there'll probably be somebody that forks Python 2 and tries to keep it going.

00:06:05.820 --> 00:06:11.540
Whether that turns out to be beneficial or, you know, trading one set of problems for a worse set of problems, we'll see.

00:06:11.540 --> 00:06:12.840
Yeah.

00:06:12.840 --> 00:06:16.520
The other one was, this one I had no visibility into.

00:06:16.520 --> 00:06:18.120
I didn't see this coming.

00:06:18.120 --> 00:06:23.620
And I read the title and I said, requirements.txt may be replaced with something better.

00:06:24.580 --> 00:06:25.260
I thought, what?

00:06:25.260 --> 00:06:26.360
Okay, well, maybe.

00:06:26.360 --> 00:06:35.220
It turns out the guys over at the Python Packaging Authority, that's the PyPI and pip and all those projects.

00:06:35.220 --> 00:06:38.380
So there's an organization, a group of people that actually work on that.

00:06:38.380 --> 00:06:40.340
They're working on this thing called pip File.

00:06:40.340 --> 00:06:46.520
And it's like a proposed new file format that's supposed to replace requirements.txt.

00:06:46.520 --> 00:06:48.300
That's interesting.

00:06:48.300 --> 00:06:48.960
Isn't it?

00:06:48.960 --> 00:06:49.160
Yeah.

00:06:49.500 --> 00:07:00.040
And so the idea is that pip File is going to be better or superior to requirements and that it has a TML syntax, which is, if I recall correctly, it's a little like YAML.

00:07:00.040 --> 00:07:03.680
There's one pip File that can have multiple configurations in it.

00:07:03.680 --> 00:07:08.200
So you don't have like a dev requirements, a test requirements, a prod requirements, and so on.

00:07:08.200 --> 00:07:09.560
Yeah, it's cool.

00:07:09.560 --> 00:07:13.460
You can do like a pip File freeze on it.

00:07:13.460 --> 00:07:20.680
It'll generate something that is a much richer document instead of just a TXT file with a package name, like a version.

00:07:21.120 --> 00:07:22.740
So there's a lot of configuration and stuff in there.

00:07:22.740 --> 00:07:31.820
Like, for example, one of the things you can do in these pip Files is you can actually set the source of the packages, like right in your requirements file.

00:07:32.600 --> 00:07:35.480
So you can say, I want to use this version of Python.

00:07:35.480 --> 00:07:39.740
I want to use it against this source, like pypi.org.

00:07:39.740 --> 00:07:43.640
Or you could create your own devpy server thing and run it internally.

00:07:43.640 --> 00:07:45.560
And that would be part of your requirements file.

00:07:45.560 --> 00:07:47.560
So lots of cool enhancements there.

00:07:47.560 --> 00:07:49.320
I'm interested to see where it goes.

00:07:49.320 --> 00:07:50.240
But it's out there on GitHub.

00:07:50.240 --> 00:07:51.220
You can actually check it out.

00:07:51.560 --> 00:08:00.100
Yeah, I'd like to make sure it sort of goes along the lines with other packaging issues, like the setup file and stuff.

00:08:00.100 --> 00:08:03.240
Hopefully we have one thing that replaces everything.

00:08:03.240 --> 00:08:04.480
Yeah, definitely.

00:08:04.480 --> 00:08:08.860
Okay, so number three is Python could get more enterprise editions.

00:08:08.860 --> 00:08:12.500
So we've got things like Anaconda and InThot.

00:08:12.500 --> 00:08:20.820
And Intel actually has their own Python implementation that is sort of a repackaging and tweaking of the Anaconda distribution.

00:08:21.200 --> 00:08:29.360
But just talking about how there may be more variations of Python distributions focused on enterprise needs.

00:08:29.360 --> 00:08:30.440
Maybe.

00:08:30.440 --> 00:08:32.820
I certainly see it happening in data science.

00:08:32.820 --> 00:08:34.400
I could see it happening elsewhere.

00:08:34.400 --> 00:08:45.080
I could see it, especially since we have to, I mean, everybody that's relying on Anaconda or something kind of has to wait for them to release something when they're waiting for a new version.

00:08:45.080 --> 00:08:48.820
And the last one is Python's software repository.

00:08:49.320 --> 00:08:53.420
So PyPI basically could get enterprise-friendly package management.

00:08:53.920 --> 00:09:05.720
So Christian Medina wrote a really interesting article as a follow-up to my episode 84 on the problems with PyPI and open source infrastructure funding and stuff.

00:09:05.720 --> 00:09:18.040
And put together a pretty interesting article talking about something called the Python Trusted Registry or Trusted Index or something like that as a way to both fund PyPI and make it more enterprise-friendly.

00:09:18.040 --> 00:09:20.840
I'm actually thinking about this problem as well.

00:09:20.840 --> 00:09:27.240
And I'm probably going to release something like an article and a proof of concept, but I'm not ready to talk about it yet.

00:09:27.240 --> 00:09:27.640
Okay.

00:09:27.640 --> 00:09:28.440
Sounds interesting.

00:09:28.440 --> 00:09:30.100
Well, so that was four predictions.

00:09:30.100 --> 00:09:31.340
Are we done with the future?

00:09:31.340 --> 00:09:32.320
That's the future.

00:09:32.320 --> 00:09:33.460
Let's go back to the present.

00:09:34.220 --> 00:09:34.700
Okay.

00:09:34.700 --> 00:09:39.860
So in the present, NumPy is used for a lot of data science and really just science and engineering.

00:09:39.860 --> 00:09:41.140
A lot of people use NumPy.

00:09:41.140 --> 00:09:46.880
There's a new book, an open source book called From Python to NumPy.

00:09:47.220 --> 00:09:51.780
And it's from, I think this is a French person, Nicolas Rogier.

00:09:51.780 --> 00:09:53.240
The book is pretty interesting.

00:09:53.240 --> 00:09:56.160
It takes the assumption that you already know Python.

00:09:56.160 --> 00:09:57.460
You're an intermediate developer.

00:09:57.460 --> 00:10:05.100
And you just need to get your understanding of NumPy to apply it to whatever problem you're on.

00:10:05.100 --> 00:10:06.380
And it looks well.

00:10:06.380 --> 00:10:08.980
I haven't read a ton of it, but it looks really well formatted.

00:10:08.980 --> 00:10:11.100
I like the topics that are in there.

00:10:11.100 --> 00:10:12.580
Just sounds interesting.

00:10:13.180 --> 00:10:14.040
Yeah, it sounds really cool.

00:10:14.040 --> 00:10:20.840
And if you're looking for scientific computation and you're thinking of like, am I going to shell out $2,000 for MATLAB?

00:10:20.840 --> 00:10:23.680
Well, you know, maybe look at some of the Python tools, right?

00:10:23.680 --> 00:10:24.460
It's definitely growing.

00:10:24.460 --> 00:10:24.820
Yeah.

00:10:24.820 --> 00:10:30.440
You know, it's cool for us to think about the future, but what if like machines could think about the future?

00:10:30.440 --> 00:10:32.680
Machines, yeah.

00:10:32.680 --> 00:10:40.280
I really feel like 2016 and 2017 is the year where AI became not something that's always five years in the future,

00:10:40.460 --> 00:10:43.480
but actually something that's starting to take shape in the present.

00:10:43.480 --> 00:10:44.060
Yeah.

00:10:44.060 --> 00:10:47.760
And it now affects everybody with all of their speaking devices.

00:10:47.760 --> 00:10:48.440
Yeah.

00:10:48.440 --> 00:10:54.160
And, you know, we could be mean and we could say, hey, Amazon thing, order us.

00:10:54.160 --> 00:10:56.020
But we won't do that.

00:10:56.020 --> 00:11:00.660
The thing, the item I want to talk about for number four here is something called universe.

00:11:00.660 --> 00:11:10.580
And it's a way to take games, basically, all sorts of games, and make them available as ways for AIs to experience the world.

00:11:10.580 --> 00:11:12.040
So here's the deal.

00:11:12.040 --> 00:11:18.120
The thing they put together where you can build an AI, put it into a Docker image, give it to their environment,

00:11:18.120 --> 00:11:22.780
and then they will let it play literally thousands of video games.

00:11:22.780 --> 00:11:25.500
And it can learn from playing the games.

00:11:25.500 --> 00:11:30.160
So you can play like flash-based browser games, other types of games, a whole bunch.

00:11:30.160 --> 00:11:31.540
Like I said, over a thousand environments.

00:11:31.540 --> 00:11:37.080
And the way it plays it is the, so you don't have to integrate with like all these different games.

00:11:37.600 --> 00:11:42.320
Your Docker image just is presented the visual screen that the humans look at.

00:11:42.320 --> 00:11:47.180
And then they send mouse and keyboard events to the games.

00:11:47.180 --> 00:11:48.100
Yeah.

00:11:48.100 --> 00:11:52.180
So they basically just play as if they were a person playing the game.

00:11:52.180 --> 00:11:54.140
So they have the same experience of the game as you.

00:11:54.140 --> 00:11:58.820
But here's all these environments in which you can train and test AIs.

00:11:58.820 --> 00:11:59.520
What do you think?

00:11:59.520 --> 00:12:05.140
It sounds like tic-tac-toe and global thermonuclear war to me.

00:12:05.580 --> 00:12:06.740
Hello, Dr. Falcon.

00:12:06.740 --> 00:12:08.240
Would you like to play a game?

00:12:08.240 --> 00:12:16.920
Well, so what's the, so if you have an AI that has learned a whole bunch of stuff about games, like why?

00:12:16.920 --> 00:12:18.280
Why would you care about this, right?

00:12:18.280 --> 00:12:23.960
Like, well, maybe you're working on a robot and you want to teach the robot to walk around and interact with the world.

00:12:23.960 --> 00:12:26.580
But you don't have the robot finished.

00:12:26.580 --> 00:12:37.140
You could take the smarts of the robot and let it play Counter-Strike or, you know, something for until it gets really good at like not bumping into stuff, like making it through paths.

00:12:37.140 --> 00:12:38.780
And then you could just plug that into your robot.

00:12:38.780 --> 00:12:39.420
I don't know.

00:12:39.420 --> 00:12:42.240
Something like, I mean, this is, this is me totally speculating on the spot.

00:12:42.240 --> 00:12:42.680
I don't know.

00:12:42.680 --> 00:12:43.080
Yeah.

00:12:43.080 --> 00:12:44.580
Just don't give your robot a gun.

00:12:44.580 --> 00:12:45.540
Yes, exactly.

00:12:45.540 --> 00:12:47.400
Because it's going to be really good at it at that point.

00:12:47.400 --> 00:12:48.160
Yeah.

00:12:48.540 --> 00:12:49.060
All right.

00:12:49.060 --> 00:12:55.420
So another thing that I've been doing a lot with lately is working with APIs and HTTP services and stuff.

00:12:55.420 --> 00:13:05.700
And your next item is a pretty interesting deep dive into literally the most popular Python package request, which for those of you don't know, is downloaded 7 million times a month.

00:13:05.700 --> 00:13:06.900
Yeah.

00:13:06.900 --> 00:13:10.460
And it's titled Python Request Deep Dive.

00:13:10.460 --> 00:13:14.680
And it came from Anthony Shaw and he put it on Medium.

00:13:14.680 --> 00:13:17.880
And Anthony's been, I don't even know why I know Anthony.

00:13:17.880 --> 00:13:19.660
I've just known about him for a long time.

00:13:19.660 --> 00:13:26.620
But he's, it's, my first thought was it's going to be just teaching people how to use requests.

00:13:26.620 --> 00:13:27.400
But it's not.

00:13:27.400 --> 00:13:29.300
It's, it's a really cool article.

00:13:29.300 --> 00:13:38.860
He took, what happened was he had, he was on a project to convert a large project from HTTP lib.

00:13:38.860 --> 00:13:42.260
So he wasn't even using URL lib2 or anything.

00:13:42.260 --> 00:13:45.040
HTTP lib into requests.

00:13:45.980 --> 00:13:49.120
And this project was Apache lib cloud.

00:13:49.120 --> 00:14:05.080
with, it was handling stuff like HTTP, HTTPS, REST, JSON, XML, whole bunch of bizarre APIs with over, he lists over 80 client libraries to handle different cloud services.

00:14:05.740 --> 00:14:10.440
And had one connection class that did the encoding and decoding of everything.

00:14:10.440 --> 00:14:12.860
And converted this all.

00:14:12.860 --> 00:14:15.420
And this article is about all the stuff he had to deal with.

00:14:15.420 --> 00:14:22.260
Like dealing with sessions, dealing with authentication, how we test it, doing prepared requests, streams.

00:14:22.960 --> 00:14:25.140
It's just a chock full of stuff.

00:14:25.140 --> 00:14:26.640
And it's not even that long of an article.

00:14:26.640 --> 00:14:27.940
So I think he did a good job.

00:14:27.940 --> 00:14:29.220
Yeah, that sounds really cool.

00:14:29.220 --> 00:14:31.580
I haven't had a chance to read it, but I definitely bookmarked it.

00:14:31.580 --> 00:14:33.220
You know, Anthony Shaw is a great guy.

00:14:33.220 --> 00:14:34.100
He's doing cool stuff.

00:14:34.100 --> 00:14:37.080
He talked about lib cloud on podcast init.

00:14:37.080 --> 00:14:40.120
I'm afraid I don't remember the number, but you can listen to him there.

00:14:40.120 --> 00:14:41.360
And that's, that's really cool.

00:14:41.360 --> 00:14:42.680
It's a cool project.

00:14:42.880 --> 00:14:49.260
And this sounds like a pretty serious real world upgrade from one library to another sort of example.

00:14:49.260 --> 00:14:52.180
And I think there's probably a lot of lessons people can get from this.

00:14:52.180 --> 00:14:58.700
And one of the, one of the neat things he has in here is he uses a tool called requests mock.

00:14:58.700 --> 00:15:05.820
And I looked through this, the API for this, and it really is pretty cool.

00:15:05.820 --> 00:15:12.280
So my, my philosophy on mocks is to, to really only mock what you absolutely have to have to do.

00:15:12.280 --> 00:15:18.780
Not everything, but some of your testing should be using mocks when you're dealing with outside resources.

00:15:18.780 --> 00:15:23.740
And, you know, an HTTP request clearly is dealing with an outside resource.

00:15:23.740 --> 00:15:29.120
But the API for this is very, very simple and very powerful.

00:15:29.120 --> 00:15:30.440
And I got to try it out.

00:15:30.440 --> 00:15:30.980
Looks neat.

00:15:30.980 --> 00:15:33.680
I hadn't heard of request mock, requests mock.

00:15:33.680 --> 00:15:35.280
And that sounds like super useful.

00:15:35.280 --> 00:15:35.780
Cause you're right.

00:15:35.780 --> 00:15:41.980
That's one of the places if you're doing testing, you really don't want to have to set up the service and configure it in test mode or whatever.

00:15:41.980 --> 00:15:45.840
Now that was dealing with APIs on the internet.

00:15:45.840 --> 00:15:48.100
How about desktop applications?

00:15:48.100 --> 00:15:48.960
Yeah.

00:15:48.960 --> 00:15:51.320
So let's talk about Python and desktop applications.

00:15:51.320 --> 00:15:55.460
I certainly, you can build interesting desktop applications.

00:15:55.460 --> 00:16:03.620
You know, Dropbox is a real world example of, you know, probably the most widely deployed Python desktop app in the world.

00:16:03.620 --> 00:16:10.260
Cause that client thing that I see spending right now in my little notification bar, that is all Python.

00:16:10.260 --> 00:16:11.040
Okay.

00:16:11.040 --> 00:16:15.180
Python two, seven, I believe they're working on upgrading to Python three, but right now it's two, seven.

00:16:15.180 --> 00:16:16.440
And that's interesting.

00:16:16.440 --> 00:16:27.480
You can use a lot of different technologies, but I kind of feel like there's just something missing to make Python a first class environment for building desktop applications.

00:16:28.000 --> 00:16:37.080
So we've had TK Ender for a long time and that's sort of built in, but I always feel like that looks, I don't know, super out of place, especially on like Mac or windows.

00:16:37.080 --> 00:16:44.320
It looks much more like it belongs in a, and sort of a UNIX, Linux space, but even there, it doesn't look super fabulous.

00:16:44.320 --> 00:16:50.060
It looks like the TK stuff that I was using with TCL when I was in college a long time ago.

00:16:50.060 --> 00:16:50.440
Exactly.

00:16:50.440 --> 00:16:53.020
And it totally works and you can do it and, and so on.

00:16:53.140 --> 00:16:56.960
So there's what the thing I want to highlight is a Reddit conversation.

00:16:56.960 --> 00:16:57.740
It's not a link.

00:16:57.740 --> 00:16:59.720
It's just a back and forth on Reddit.

00:16:59.720 --> 00:17:04.400
What's the community's favorite for developing OS 10 applications with Python?

00:17:04.400 --> 00:17:07.220
So there's a couple of people that weighed in by far.

00:17:07.220 --> 00:17:14.120
I think PyQt came in as the most highly voted up.

00:17:14.120 --> 00:17:16.300
And have you done anything with Qt?

00:17:16.300 --> 00:17:18.720
I did a small project with him a long time ago.

00:17:18.980 --> 00:17:19.180
Yeah.

00:17:19.180 --> 00:17:24.920
The thing I like about Qt is it, the stuff that comes out of it looks native.

00:17:24.920 --> 00:17:26.260
It's based on C++.

00:17:26.260 --> 00:17:27.960
So it starts super fast.

00:17:27.960 --> 00:17:31.160
It feels like an app that belongs wherever it's running.

00:17:31.160 --> 00:17:32.260
And I think that's cool.

00:17:32.260 --> 00:17:37.140
The challenge with this is you've got PyQt, the package, and you've got PySide.

00:17:37.140 --> 00:17:43.100
And these have been sort of competing, not entirely compatible ways of writing this code.

00:17:43.100 --> 00:17:48.960
I think PySide is the better licensing model, but it's, if I recall correctly,

00:17:48.960 --> 00:17:52.100
it only supports Qt4 and Qt is on Qt5.

00:17:52.100 --> 00:17:54.880
And so there's just all this sort of like, oh, it almost works.

00:17:54.880 --> 00:17:58.200
It's kind of hard to deploy Qt on the various machines.

00:17:58.200 --> 00:18:00.440
You've got to, it's sort of a heavyweight install and so on.

00:18:00.440 --> 00:18:01.500
This should be getting better.

00:18:01.500 --> 00:18:08.800
I think Qt, the company that runs Qt is bringing PySide back in and going to modernize it.

00:18:08.800 --> 00:18:11.480
But that's not coming out until the end of this year, probably.

00:18:11.700 --> 00:18:13.580
So one vote was for Qt.

00:18:13.580 --> 00:18:14.220
That was cool.

00:18:14.220 --> 00:18:15.980
Another one was for TK.

00:18:15.980 --> 00:18:19.760
Simple, avoids dependencies, but like we already talked about that.

00:18:19.760 --> 00:18:21.780
Kivy, Kivy definitely got a vote.

00:18:21.780 --> 00:18:25.520
But Kivy is much more, it's not sort of a desktop app feeling.

00:18:25.520 --> 00:18:27.800
It's more like, like almost like games.

00:18:27.800 --> 00:18:29.840
I think its origins were in games.

00:18:29.840 --> 00:18:34.040
So what you get is, is it doesn't really have a native feel, right?

00:18:34.040 --> 00:18:35.780
So that's, that's not that great.

00:18:35.780 --> 00:18:39.060
I think, I think some people are using it for kiosks and stuff.

00:18:39.200 --> 00:18:39.880
Yeah, yeah.

00:18:39.880 --> 00:18:40.820
And that's not bad.

00:18:40.820 --> 00:18:44.460
I know it does a great thing, great stuff on, on mobile as well.

00:18:44.460 --> 00:18:46.520
There's some debate whether that was the right choice.

00:18:46.520 --> 00:18:47.940
There's Toga, which is really cool.

00:18:47.940 --> 00:18:53.640
Toga from the Beware guys, but it's also, Toga is like real early, doesn't have support for all the APIs and stuff.

00:18:54.000 --> 00:19:08.000
So I kind of want to point this out to just say like, you know, to keep raising the issue like, hey, Python community, like it would be awesome if there was something that was really clearly fantastic for building apps.

00:19:08.000 --> 00:19:11.000
It's where, where people say, of course you should use this.

00:19:11.000 --> 00:19:13.860
It's as good as Swift for OS X apps.

00:19:13.860 --> 00:19:17.420
It's as good as WPF for Windows apps or whatever.

00:19:17.420 --> 00:19:18.460
It just, it feels native.

00:19:18.460 --> 00:19:20.400
It's really all coherent.

00:19:20.400 --> 00:19:22.620
And I just don't see that existing yet.

00:19:22.620 --> 00:19:25.160
I think the Beware guys are the closest to it.

00:19:25.160 --> 00:19:26.760
It was an interesting conversation.

00:19:26.940 --> 00:19:32.320
And you've brought it up before that it would, I think you brought it up on Twitter that it'd be cool if we had something kind of like Electron.

00:19:32.320 --> 00:19:33.160
Yeah.

00:19:33.160 --> 00:19:41.120
For those of you who don't know what Electron is, Electron JS is a way to write apps that ship entirely bundled.

00:19:41.120 --> 00:19:43.680
There's just a single thing you run.

00:19:43.680 --> 00:19:47.360
It's an EXE or a binary on Linux or .app on Mac.

00:19:47.360 --> 00:19:55.680
There's zero dependencies and it runs Node.js as the sort of smarts and it embeds its own copy of Chromium, the UI.

00:19:56.440 --> 00:20:02.360
So it's basically you use HTML, JavaScript, and CSS to build your UI and you can use frameworks that make it look native.

00:20:02.360 --> 00:20:05.860
And then you've got Node as the backend to keep this all going.

00:20:05.860 --> 00:20:08.240
There's a few projects that almost do this on Python.

00:20:08.240 --> 00:20:19.720
Like there's one about Django that will let you like ship Django sort of backends that will create GUI looking things where you're doing it with basically Django running locally.

00:20:19.720 --> 00:20:25.360
You know, I don't really want my app to say, do you want this app to act as a server?

00:20:25.940 --> 00:20:26.660
Yeah.

00:20:26.660 --> 00:20:29.800
When I try to run it and they'd be like, this is not supposed to be a server app.

00:20:29.800 --> 00:20:32.560
Like what kind of weird thing have I got a hold of here, right?

00:20:32.560 --> 00:20:37.380
I want something that feels like it drops in and it's basically indistinguishable from a native app.

00:20:37.380 --> 00:20:38.980
And we can dream.

00:20:39.360 --> 00:20:50.920
One step that's a good step in that direction is CX Freeze, which lets you take Python code plus its dependencies and the Python implementation and everything and package it into a redistributable.

00:20:50.920 --> 00:20:53.900
And that just released version 501 in January.

00:20:53.900 --> 00:20:55.580
So that's cool to see that coming along.

00:20:55.580 --> 00:20:57.440
So that's one of the important building blocks at least.

00:20:57.440 --> 00:20:58.100
Okay.

00:20:58.100 --> 00:20:58.800
That's cool.

00:20:58.960 --> 00:21:05.460
Someday I dream of a future where, I don't know, there's some whizzy UI framework with a visual designer for Python.

00:21:05.820 --> 00:21:06.440
It is.

00:21:06.440 --> 00:21:09.200
It's interesting that I don't really think about that that much.

00:21:09.680 --> 00:21:18.920
But the, I mean, you spend so much time in interacting with elements on a desktop, even though we don't develop them very often.

00:21:18.920 --> 00:21:20.040
Not to say it can't be done.

00:21:20.040 --> 00:21:25.160
I just think it could go up a couple levels and it would make a really big difference in the adoption of Python.

00:21:25.160 --> 00:21:25.680
Definitely.

00:21:26.040 --> 00:21:31.940
It's already growing super well, but if you could take over to the desktop market with it as well, then who knows where it would go.

00:21:31.940 --> 00:21:32.520
Yeah.

00:21:32.520 --> 00:21:33.840
Maybe you should do that, Michael.

00:21:33.840 --> 00:21:34.820
You can take it off.

00:21:34.820 --> 00:21:35.220
Yeah.

00:21:35.220 --> 00:21:35.940
I have so much time.

00:21:35.940 --> 00:21:36.900
That seems like a great idea.

00:21:36.900 --> 00:21:37.980
Yeah.

00:21:37.980 --> 00:21:38.400
Okay.

00:21:38.400 --> 00:21:41.020
So if you don't have time for that, what are you doing?

00:21:41.020 --> 00:21:43.200
I'm working on my classes.

00:21:43.200 --> 00:21:47.960
I'm actually working on some stuff that has these things we were talking about in mind.

00:21:47.960 --> 00:21:51.460
It's sort of at the top of my mind, but I'm not ready to announce anything yet.

00:21:51.460 --> 00:21:57.380
But cool, cool projects that I'm working on and I'm, I'm working on a special episode of

00:21:57.380 --> 00:21:58.180
Talk Python To Me.

00:21:58.180 --> 00:22:00.180
We've got episode 100 coming up.

00:22:00.180 --> 00:22:01.180
So I have a special guest.

00:22:01.180 --> 00:22:04.120
I'm not going to announce until I release it, but that one's going to be big.

00:22:04.120 --> 00:22:06.080
I can't believe it's been a hundred already.

00:22:06.080 --> 00:22:06.760
I know.

00:22:06.760 --> 00:22:07.900
Two years.

00:22:07.900 --> 00:22:08.400
I'm amazing.

00:22:08.400 --> 00:22:08.800
Yeah.

00:22:08.800 --> 00:22:14.560
Speaking of, so podcasts, I, I've got a couple coming up, hopefully pretty soon.

00:22:14.560 --> 00:22:15.440
They just need edited.

00:22:15.440 --> 00:22:17.280
Talk to some really great people.

00:22:17.280 --> 00:22:22.720
And then I was interviewed on a podcast called, reflection as a service.

00:22:22.720 --> 00:22:28.120
And, and that was really fun to talk with, somebody else about, test driven

00:22:28.120 --> 00:22:28.560
development.

00:22:28.560 --> 00:22:34.740
And, and, I think I talked about the, testing column that I think I made

00:22:34.740 --> 00:22:36.960
up on the fly while I was talking with you one day.

00:22:36.960 --> 00:22:38.220
We're going to make that a thing.

00:22:38.220 --> 00:22:42.240
So yeah, that's, and then I'm still writing.

00:22:42.240 --> 00:22:43.560
So that's what I'm up to.

00:22:43.560 --> 00:22:43.920
Awesome.

00:22:43.920 --> 00:22:44.160
Yeah.

00:22:44.160 --> 00:22:46.000
You, you got some good reviewers for your book, right?

00:22:46.360 --> 00:22:50.600
Yeah, definitely that most of the, a lot, a big chunk of the pytest, core team has

00:22:50.600 --> 00:22:54.780
helped, agreed to help out and make sure I don't say something stupid.

00:22:54.780 --> 00:22:55.920
So I appreciate that.

00:22:55.920 --> 00:22:56.340
Yeah.

00:22:56.340 --> 00:22:57.340
That's, that's really excellent.

00:22:57.340 --> 00:23:00.560
I feel like we've definitely given people a lot of information this week.

00:23:00.560 --> 00:23:01.620
Definitely.

00:23:01.620 --> 00:23:02.480
It's good.

00:23:02.480 --> 00:23:03.960
And pretty drama free.

00:23:03.960 --> 00:23:05.020
So that's always nice.

00:23:05.020 --> 00:23:06.080
Yeah.

00:23:06.080 --> 00:23:09.320
Well, thanks a lot for talking to me today.

00:23:09.320 --> 00:23:09.800
You bet.

00:23:09.800 --> 00:23:12.740
It was great to share this with you, Brian, and I'll catch up with you next week.

00:23:14.140 --> 00:23:15.940
Thank you for listening to Python Bytes.

00:23:15.940 --> 00:23:18.520
Follow the show on Twitter via at Python Bytes.

00:23:18.520 --> 00:23:21.400
That's Python Bytes as in B-Y-T-E-S.

00:23:21.400 --> 00:23:24.840
And get the full show notes at Pythonbytes.fm.

00:23:24.840 --> 00:23:29.160
If you have a news item you want featured, just visit Pythonbytes.fm and send it our way.

00:23:29.160 --> 00:23:31.880
We're always on the lookout for sharing something cool.

00:23:31.880 --> 00:23:35.260
On behalf of myself and Brian Okken, this is Michael Kennedy.

00:23:35.260 --> 00:23:38.880
Thank you for listening and sharing this podcast with your friends and colleagues.