WEBVTT 00:00:00.001 --> 00:00:04.800 Python is taking over much of the development world as it quickly is becoming one of the, 00:00:04.800 --> 00:00:07.940 or simply the most, widely used programming languages. 00:00:07.940 --> 00:00:11.360 But that does not mean that Python is without its weaknesses. 00:00:11.360 --> 00:00:14.060 In my mind, there are three such weaknesses. 00:00:14.060 --> 00:00:18.080 Number one, GUI applications, desktop applications, that kind of thing. 00:00:18.080 --> 00:00:24.660 Number two, a native general purpose mobile app for iOS and Android framework that we can 00:00:24.660 --> 00:00:25.720 build that in Python. 00:00:25.720 --> 00:00:27.020 And number three, deployment. 00:00:27.620 --> 00:00:32.640 So that is a single binary or set of binary and resource files that I can send either 00:00:32.640 --> 00:00:35.600 to a mobile device or to a desktop app or to a server. 00:00:35.600 --> 00:00:39.500 And it just runs regardless of what they have installed on their system. 00:00:39.500 --> 00:00:42.920 This episode is primarily about number one, the GUI frameworks. 00:00:42.920 --> 00:00:47.100 One of the best frameworks out there looking to make Python a better language for desktop 00:00:47.100 --> 00:00:50.060 applications is Qt, namely Qt for Python. 00:00:50.060 --> 00:00:55.140 This week, you'll meet Christian Mareria Fredes from Qt to tell us all about the revitalization 00:00:55.140 --> 00:00:56.680 of Qt in the Python space. 00:00:56.960 --> 00:01:01.500 But you'll also learn they have aspirations to make Qt for Python an option for mobile 00:01:01.500 --> 00:01:05.080 app development and to solve the deployment problem as well. 00:01:05.080 --> 00:01:07.840 That hits all three of the weak spots I was telling you about. 00:01:07.840 --> 00:01:10.180 We could only be rooting for them to solve these problems. 00:01:10.180 --> 00:01:15.600 This is Talk Python To Me, episode 183, recorded October 10th, 2018. 00:01:15.600 --> 00:01:34.140 Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem 00:01:34.140 --> 00:01:35.160 and the personalities. 00:01:35.160 --> 00:01:37.080 This is your host, Michael Kennedy. 00:01:37.080 --> 00:01:39.220 Follow me on Twitter where I'm @mkennedy. 00:01:39.480 --> 00:01:44.340 Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter 00:01:44.340 --> 00:01:45.400 via at Talk Python. 00:01:45.400 --> 00:01:47.760 Christian, welcome to Talk Python To Me. 00:01:47.760 --> 00:01:48.620 Thank you very much. 00:01:48.620 --> 00:01:49.820 It's great to have you here. 00:01:50.000 --> 00:01:54.800 I'm very much looking forward to talking about Python GUIs, something I would love to spread 00:01:54.800 --> 00:01:58.720 the word about, something I would like to see more options for. 00:01:58.720 --> 00:02:00.880 And it seems like you are doing great work around that. 00:02:00.880 --> 00:02:01.480 Yeah, totally. 00:02:01.480 --> 00:02:02.940 I mean, that's why I'm here. 00:02:02.940 --> 00:02:07.080 I mean, Qt for Python is something kind of new for the Qt project itself. 00:02:07.080 --> 00:02:10.280 So I'm looking forward to discuss more things about it. 00:02:10.340 --> 00:02:10.780 Yeah, exactly. 00:02:10.780 --> 00:02:14.280 It seems like there's a real revitalization around that project, which is awesome. 00:02:14.280 --> 00:02:16.580 Before we get to that, though, let's start with your story. 00:02:16.580 --> 00:02:17.940 How did you get into programming in Python? 00:02:17.940 --> 00:02:20.820 Well, everything started when I started in the university. 00:02:20.820 --> 00:02:23.640 I had no knowledge of programming whatsoever. 00:02:23.640 --> 00:02:26.100 I still remember the first class on the blackboard. 00:02:26.100 --> 00:02:28.460 There was an X equals to X plus one. 00:02:28.460 --> 00:02:30.640 It made no mathematical sense to me. 00:02:30.640 --> 00:02:33.740 And yeah, it was mainly in C. 00:02:33.740 --> 00:02:38.500 But on the second year, there was some weird class talking about Python that you didn't 00:02:38.500 --> 00:02:38.800 know. 00:02:38.800 --> 00:02:42.720 And from that day on, I mean, I started to do things by myself. 00:02:42.720 --> 00:02:43.780 And then here I am. 00:02:43.780 --> 00:02:45.400 That's really awesome. 00:02:45.400 --> 00:02:49.000 So you had a formal computer science degree program you went through? 00:02:49.000 --> 00:02:49.400 Yeah. 00:02:49.400 --> 00:02:49.880 Yeah. 00:02:49.880 --> 00:02:51.680 Back in my country, I'm from Chile. 00:02:51.680 --> 00:02:55.040 There is something called informatics engineer. 00:02:55.040 --> 00:03:00.040 So there is more like computer science, which I do a bit more of how company works and everything 00:03:00.040 --> 00:03:00.460 like that. 00:03:00.460 --> 00:03:02.780 So it's like a six year or something of study. 00:03:02.780 --> 00:03:06.200 Oh, that sounds like a really cool project or study, course, study. 00:03:06.200 --> 00:03:07.420 Yeah, totally. 00:03:07.420 --> 00:03:07.720 Yeah. 00:03:07.720 --> 00:03:09.000 And so how about today? 00:03:09.000 --> 00:03:09.940 What are you doing now? 00:03:09.940 --> 00:03:14.680 Well, we are currently approaching the official release of Qt for Python. 00:03:14.680 --> 00:03:16.540 So we are really excited about it. 00:03:16.540 --> 00:03:19.540 But of course, you will understand that there are many things to do. 00:03:19.540 --> 00:03:25.140 So we are, you know, I mean, today was like a normal day, something, some bucks and trying 00:03:25.140 --> 00:03:29.460 to bring all the features for the final release that will happen at the end of the year. 00:03:29.460 --> 00:03:30.540 I'm very excited for that. 00:03:30.640 --> 00:03:33.180 So you work for the Qt company that makes Qt. 00:03:33.180 --> 00:03:33.420 Yes. 00:03:33.420 --> 00:03:34.960 Yeah, exactly. 00:03:34.960 --> 00:03:40.840 I recently, well, not recently, at the beginning of this year, I am here currently in Berlin. 00:03:40.840 --> 00:03:42.560 I was doing my PhD here. 00:03:42.800 --> 00:03:45.660 And then I decided to move it back to industry. 00:03:45.660 --> 00:03:49.320 So I started to work for the Qt company because I was aware of it. 00:03:49.320 --> 00:03:55.020 I mean, since like 2009 or something, I had some small projects and I was really curious about it, what they were doing. 00:03:55.020 --> 00:04:00.340 And there was this opening, I apply and I started to work here in the Qt company. 00:04:01.000 --> 00:04:01.340 Excellent. 00:04:01.340 --> 00:04:06.080 So I guess a good place to start is just what is Qt? 00:04:06.080 --> 00:04:11.160 Because we have things like PySide and PyQt and Qt for Python. 00:04:11.160 --> 00:04:16.440 But Qt is a UI framework much larger than just Python, right? 00:04:16.440 --> 00:04:17.080 Right. 00:04:17.080 --> 00:04:23.640 I mean, to be honest, I mean, when I first started to work in Qt, for me, it was just a library to do interfaces, right? 00:04:23.640 --> 00:04:30.840 So, but with all the other years of experience, I started to notice that it's really more than a cross-platform application framework. 00:04:30.840 --> 00:04:43.840 And I mean, I noticed that even for C++ users, you are able to write some scripts and combine and have some tools for SQL or any like sockets and modules for everything that you can imagine. 00:04:43.840 --> 00:04:48.560 I mean, the modules are really a lot and the things that you can do are really imaginable. 00:04:48.560 --> 00:04:52.120 So let me see if I have my conception correct. 00:04:52.980 --> 00:04:54.080 Yeah, I'll bounce this off you. 00:04:54.080 --> 00:04:54.660 You let me know. 00:04:54.660 --> 00:05:01.920 So for me, it seems like Qt is a framework for building cross-platform applications. 00:05:01.920 --> 00:05:10.320 Much of that is GUI, but there's also things like custom threading things and, like you said, other libraries as well. 00:05:10.320 --> 00:05:12.080 Is that a pretty good summary? 00:05:12.080 --> 00:05:13.060 Yeah, I don't know. 00:05:13.060 --> 00:05:13.920 That's a good summary. 00:05:13.920 --> 00:05:16.100 That's a summary when I start my talks. 00:05:16.100 --> 00:05:17.740 All right, perfect. 00:05:17.740 --> 00:05:20.380 Yeah, so I guess I have a pretty good conception of it. 00:05:20.380 --> 00:05:31.020 And I feel like the apps built in Qt are really nice because they seem like they belong on the OS or platform they're running on. 00:05:31.020 --> 00:05:34.920 I feel like so many of these cross-platform things just stand out like a sore thumb. 00:05:34.920 --> 00:05:38.960 One, a lot of them look like they're from, like, you know, 1990. 00:05:38.960 --> 00:05:45.900 The other is you're like, whoa, that's not what a button looks like on macOS or on Windows or whatever it happens to be here on, right? 00:05:46.020 --> 00:05:46.320 Exactly. 00:05:46.320 --> 00:05:52.020 Yeah, my first experience, for example, I remember when I was learning Python, I wanted to do some simple application. 00:05:52.020 --> 00:05:55.740 I tried to use TK, you know, TK Inter. 00:05:55.740 --> 00:05:56.060 Yeah. 00:05:56.060 --> 00:06:02.740 I mean, I admire the work, but, I mean, Inter interface doesn't look really well there. 00:06:02.740 --> 00:06:04.900 And then I started to move around and everything. 00:06:05.240 --> 00:06:09.740 And, of course, I'm aware that you know that, for example, one of the biggest projects that uses Qt is KDE. 00:06:09.740 --> 00:06:15.820 And at least when I started with Linux, it was the most, like, you know, graphical appealing environment for me. 00:06:15.820 --> 00:06:16.840 So, yeah. 00:06:16.840 --> 00:06:17.800 Yeah, that's really nice. 00:06:17.800 --> 00:06:18.580 That's really great. 00:06:18.580 --> 00:06:21.860 So, let's bring this conversation over to Python now. 00:06:22.400 --> 00:06:28.680 And maybe we could do a quick tour of what are our options for building Python GUIs at all. 00:06:28.680 --> 00:06:31.220 I mean, you brought up TK Inter. 00:06:31.220 --> 00:06:34.900 Well, obviously, we have Qt for Python nowadays. 00:06:34.900 --> 00:06:37.880 There's other things like WX Python. 00:06:37.880 --> 00:06:40.440 Do you want to give us a quick tour of what our options are? 00:06:40.780 --> 00:06:43.180 Well, I mean, you mentioned, like, the main ones, right? 00:06:43.180 --> 00:06:50.140 I mean, if you go into the Wiki page, for example, you can see that the list is, like, over 30 different modules to do different things. 00:06:50.140 --> 00:06:53.580 But, of course, not all of them are active now. 00:06:53.580 --> 00:06:58.960 So, personally, the ones that I am aware of that they are currently developed are, like, TK Inter. 00:06:58.960 --> 00:07:00.260 I mean, the WX Python. 00:07:00.260 --> 00:07:05.020 There is also PyQt, another set of bindings for Qt. 00:07:05.080 --> 00:07:12.760 And also, there is another one called, what's the name, Kiwi, that also, lately, I have heard a lot of Hacker News and Reddit. 00:07:12.760 --> 00:07:16.460 So, I think it is quite becoming a little bit famous. 00:07:16.460 --> 00:07:17.440 Yeah, that's good. 00:07:17.440 --> 00:07:18.980 Yeah, Kiwi's doing good stuff. 00:07:18.980 --> 00:07:24.540 I feel like it's really focused on more on, like, game experiences. 00:07:24.540 --> 00:07:29.520 And something like Qt, you could build, you know, a traditional application, right? 00:07:29.520 --> 00:07:34.280 You could build Visual Studio Code or PyCharm or a web browser or something like that. 00:07:34.280 --> 00:07:41.120 Yeah, I mean, as you can see, at the beginning, of course, for me, KDE was the biggest and only project. 00:07:41.120 --> 00:07:54.480 But with the time, I mean, you can notice that nowadays, with all this data science boom, you can find, like, tools like Tableau, for example, that is written in using Qt or the latest version of VirtualBox and VLC. 00:07:54.480 --> 00:07:55.960 I'm not even there. 00:07:55.960 --> 00:07:57.800 I mean, because she's enjoying the company. 00:07:57.800 --> 00:08:04.260 I noticed that, okay, I mean, when I was saying that this is a company, I mean, do we have other clients or outside, you know, open source project? 00:08:04.260 --> 00:08:09.860 And I noticed that, for example, many companies in the automotive industry are using it right now. 00:08:09.860 --> 00:08:13.180 I mean, of course, since we're in Germany, there's Mercedes. 00:08:13.180 --> 00:08:16.780 And also lately, Peugeot announced something like that. 00:08:16.780 --> 00:08:17.780 They were including Qt. 00:08:17.820 --> 00:08:27.620 But most importantly, at least for me, for my geek standards, the cockpit of the Tesla car, for example, is designed using one of the Q technologies. 00:08:27.620 --> 00:08:29.500 So that was really impressive. 00:08:29.500 --> 00:08:30.960 Yeah, it was really impressive for me. 00:08:31.080 --> 00:08:37.200 Yeah, Tesla is definitely one of the more, you know, turned on car companies in terms of technology. 00:08:37.200 --> 00:08:38.320 So that's pretty awesome. 00:08:38.320 --> 00:08:38.680 Yeah. 00:08:38.680 --> 00:08:42.020 And you also have, you said that it's in LG smart TVs. 00:08:42.020 --> 00:08:42.560 Is that right? 00:08:42.560 --> 00:08:43.140 Yeah. 00:08:43.140 --> 00:08:46.120 I mean, also, I mean, there is a couple of these TVs that have some manual. 00:08:46.120 --> 00:08:51.320 I don't know how to describe it, but it's on the button that you have, like, different elements of the menu and stuff. 00:08:51.400 --> 00:08:53.700 And that's also written with Qt. 00:08:53.700 --> 00:08:58.640 And there is also some entertainment system by different electronic companies. 00:08:58.640 --> 00:09:03.480 And, I mean, this is not just the official clients of Qt, right? 00:09:03.480 --> 00:09:05.320 I mean, you know, it's an open source project also. 00:09:05.320 --> 00:09:07.060 So there are many companies out there. 00:09:07.060 --> 00:09:14.220 And luckily, on the latest conference that I went, for example, I met people of the biggest companies that approached me as, 00:09:14.220 --> 00:09:17.580 ah, yes, we are using Qt for some internal project and everything. 00:09:17.580 --> 00:09:20.680 So, of course, we have a lot of open source clients, too. 00:09:20.960 --> 00:09:21.660 That's really cool. 00:09:21.660 --> 00:09:26.560 I've talked to some companies even thinking about using it for devices, little embedded devices and stuff. 00:09:26.560 --> 00:09:26.800 Yeah. 00:09:26.800 --> 00:09:28.240 That's really a hard topic right now. 00:09:28.240 --> 00:09:35.580 And, I mean, I didn't have the luck yet to work on embedded systems, but there is a lot of people doing a lot of work on embedded devices. 00:09:35.580 --> 00:09:40.480 So, and every time that there are conferences, I mean, those are the things that steal the show. 00:09:40.480 --> 00:09:43.820 I mean, all these embedded systems that we have in comparison with other technologies. 00:09:43.820 --> 00:09:49.380 But, yeah, sadly, I am not an expert on that field, but maybe next time we can go further. 00:09:49.580 --> 00:09:50.900 Yeah, that'd be great. 00:09:50.900 --> 00:09:52.680 Yeah, it feels like Kickstarter should be involved. 00:09:52.680 --> 00:09:54.800 A little cute, a little Kickstarter. 00:09:54.800 --> 00:09:55.780 Yeah. 00:09:55.780 --> 00:09:57.280 And something awesome could be launched. 00:09:57.280 --> 00:09:57.520 Yeah. 00:09:57.520 --> 00:09:59.260 Very, very cool. 00:09:59.820 --> 00:10:06.380 So, the reason I reached out to you guys is we did this overview of the various GUI options. 00:10:06.380 --> 00:10:12.940 And, you know, those folks who listen to my other podcast, Python Bytes, know that we've gone over so many options. 00:10:12.940 --> 00:10:14.960 And there are a bunch of them. 00:10:15.240 --> 00:10:21.900 But I feel like, like I said, Qt is one of the more, it looks native and it seems like you can build really nice apps with it. 00:10:21.900 --> 00:10:29.100 But for a while, there had been this, I don't know, this sort of almost discontent where we had, what, PySide? 00:10:29.100 --> 00:10:30.940 We had PySide 2. 00:10:30.940 --> 00:10:31.340 Yeah. 00:10:31.340 --> 00:10:36.460 You know, PyQt for Qt 4 and then Qt 5. 00:10:36.460 --> 00:10:38.280 And it was like, well, what is the license model? 00:10:38.280 --> 00:10:39.180 What one is up to date? 00:10:39.180 --> 00:10:39.860 What should we do? 00:10:39.860 --> 00:10:45.540 Can you just sort of let us know, you know, why did you guys work on Qt for Python? 00:10:45.540 --> 00:10:49.540 And, you know, what is the state of that whole conversation there? 00:10:49.540 --> 00:10:59.060 Yeah, well, I mean, the story is a little bit longer, but it mainly started with like, there was some collaborations of Qt in a different country. 00:10:59.060 --> 00:10:59.840 I think it was Brazil. 00:10:59.840 --> 00:11:03.940 And they decided to start a new set of bindings for Qt. 00:11:03.940 --> 00:11:06.000 And the PySide project was born. 00:11:06.000 --> 00:11:07.200 And then... 00:11:07.200 --> 00:11:08.820 Maybe just find that real quick for folks. 00:11:08.820 --> 00:11:10.760 Like when you say binding, what do you mean? 00:11:10.760 --> 00:11:16.080 These are like Python libraries that we can use in Python, but they talk to the C API? 00:11:16.080 --> 00:11:16.920 Exactly. 00:11:16.920 --> 00:11:22.520 There is some CPython code that will be like connected to C libraries. 00:11:22.520 --> 00:11:26.860 So that's why we can expose this C++ framework to Python world. 00:11:26.860 --> 00:11:31.500 So we have some glue in the middle that maybe later we can discuss. 00:11:31.500 --> 00:11:39.640 But yeah, I mean, I know that it's confusing about the names, but I mean, it's really depending on the changes of the Qt projects. 00:11:39.640 --> 00:11:43.760 Because, I mean, there was some Nokia related things going on in the middle. 00:11:43.760 --> 00:11:45.420 And then there was like no Nokia. 00:11:45.420 --> 00:11:48.940 And then the project started to evolve. 00:11:48.940 --> 00:11:51.080 The Qt was Qt 4 back then. 00:11:51.080 --> 00:11:53.180 And then they said, okay, but now it's Qt 5. 00:11:53.180 --> 00:11:53.940 So what do we do? 00:11:53.940 --> 00:11:57.860 And there was some effort by the community to start to port it. 00:11:57.860 --> 00:12:00.040 And that's why PySide 2 was born. 00:12:00.040 --> 00:12:02.100 Because now there was support for Qt 5. 00:12:02.300 --> 00:12:08.020 But the problem is that at the company, we didn't want to focus just in the module. 00:12:08.020 --> 00:12:12.800 And this is really important for me to say because Qt 4 Python is not just the module. 00:12:12.800 --> 00:12:20.240 I mean, we have a lot of ideas and things going on that will try to complement this PySide 2 module that currently we have. 00:12:20.240 --> 00:12:20.540 Okay. 00:12:20.700 --> 00:12:22.060 That sounds very interesting. 00:12:22.060 --> 00:12:24.880 So where does Qt 4 Python fit? 00:12:24.880 --> 00:12:29.000 Is this just you taking over the PySide 2 project? 00:12:29.000 --> 00:12:30.160 Is this something different? 00:12:30.160 --> 00:12:30.700 Yeah. 00:12:30.700 --> 00:12:31.500 Well, that's the thing. 00:12:31.500 --> 00:12:35.300 I mean, at the beginning it was associated with Qt, but not officially supported. 00:12:35.300 --> 00:12:44.840 So now the move, all this noise that we have been generating is because we are officially supporting PySide 2 as a module in one of the Qt products. 00:12:44.840 --> 00:12:53.560 So that means that any person that wants to start to use Qt by open source will have the options to get PySide 2 as a module, also to play around with Python. 00:12:53.560 --> 00:13:03.820 Or if you're a client, for example, and you want to have some commercial license and everything, you will have the option also to get these officially supported bindings that allows you to use Qt from Python. 00:13:03.820 --> 00:13:04.600 That sounds awesome. 00:13:04.720 --> 00:13:11.200 I'm really excited to hear that you're focusing full effort on this GUI platform for Python. 00:13:11.200 --> 00:13:12.140 Yeah, totally. 00:13:12.140 --> 00:13:13.080 Yeah, it's going to be great. 00:13:13.080 --> 00:13:20.820 And you said the official first release of this Qt for Python update is targeted at the end of the year? 00:13:20.820 --> 00:13:21.200 Yeah. 00:13:21.200 --> 00:13:29.080 Well, at the moment, the project was being heavily developed, and we decided to give it a try. 00:13:29.380 --> 00:13:35.000 So we generated the first set of wheels that we released on PyPy, like in June, I think. 00:13:35.000 --> 00:13:38.900 But of course, this was under the technical preview label. 00:13:38.900 --> 00:13:40.900 So of course, use it at your own risk. 00:13:41.600 --> 00:13:56.680 But we are currently reaching a maturity stage that we are sure that by the end of the year, which is the release of Qt 5.12, we will include the official wheels without the technical preview tag. 00:13:56.680 --> 00:13:58.580 So yeah, we're really looking forward to it. 00:13:58.780 --> 00:14:00.280 Oh, that's going to be super cool. 00:14:00.280 --> 00:14:03.140 Now, you're talking about wheels. 00:14:03.140 --> 00:14:09.140 So that's when I pip install a thing, you know, downloads it and installs it in a nice, simple, Pythonic way. 00:14:09.760 --> 00:14:10.040 Exactly. 00:14:10.040 --> 00:14:21.020 I believe previously in the PySide, PyQt days, that was harder to basically deploy an app that was built on Qt or one of those frameworks, right? 00:14:21.020 --> 00:14:22.500 Right, right. 00:14:22.500 --> 00:14:23.900 So, go ahead. 00:14:24.040 --> 00:14:39.840 Yeah, no, but I mean, if you, well, even before, I mean, I don't know, I mean, I know that you have been using Python for a lot of time, but even the time with X, you remember that X was first before the wheel, it was quite complicated to generate this kind of like project and stuff. 00:14:39.840 --> 00:14:41.820 And I always was struggling with this. 00:14:41.820 --> 00:14:48.580 But yeah, at the moment, for example, many users ask us like how to deploy applications, how to move these things around. 00:14:48.580 --> 00:14:51.880 But yeah, we usually encourage people to use PyInstaller. 00:14:52.120 --> 00:15:02.620 So, yeah, spoiler alert, that's one of the things that we are currently working on, like to try to help the users to provide ways to deploy the application in a more easy way. 00:15:02.620 --> 00:15:12.280 Because Qt is cross-platform, so, of course, you would like to have some binary that you can, like, move around and try to execute and try to don't worry about on which platform you are running. 00:15:12.280 --> 00:15:14.780 Oh, you guys would take it up a level if you did that. 00:15:15.020 --> 00:15:23.700 I mean, if there was a build my project for macOS, build my project for Linux, and here's the thing you give your users or you put on your website. 00:15:23.700 --> 00:15:27.520 Seriously, that, I mean, you already have one of the best cross-platform frameworks. 00:15:27.520 --> 00:15:31.900 And if you could solve the deployment problem for Python, it would be all. 00:15:31.900 --> 00:15:32.560 Yeah. 00:15:32.560 --> 00:15:33.080 Yeah. 00:15:33.080 --> 00:15:34.740 There are a few options out there. 00:15:34.860 --> 00:15:43.980 I mean, currently, there was some, or a blog, there was a story of another system that was called FBS, which is a guy that we had the pleasure to talk with. 00:15:43.980 --> 00:15:53.800 And they also have some small project that is starting to attack this problem because it's really, I mean, it's like every day someone on IRC is asking about, like, how do I deploy my application? 00:15:53.800 --> 00:15:56.300 How can I integrate this with other tools and everything? 00:15:56.460 --> 00:15:59.680 Yeah, yeah, that's the Fman build system from Michael Herman. 00:15:59.680 --> 00:16:00.560 That's pretty awesome. 00:16:00.560 --> 00:16:03.200 Yeah, so that's a pretty promising project. 00:16:03.200 --> 00:16:08.620 And if you could get some sweet integration where, you know, a lot of, yeah, it seems really, really nice. 00:16:08.620 --> 00:16:10.040 And he's doing a lot of stuff with Qt. 00:16:10.040 --> 00:16:10.340 Yeah. 00:16:10.340 --> 00:16:12.100 So that's cool that you guys are talking. 00:16:12.100 --> 00:16:12.480 Yeah. 00:16:12.480 --> 00:16:23.340 I think it's already, though, it's already better that you can pip install -r requirements.txt or, you know, pip inf your world, and you just get the Qt runtime. 00:16:23.340 --> 00:16:32.380 I'm at a cute runtime, excuse me, which it doesn't mean, like, oh, go get this weird installer from some other place that you're not really sure, install that, right? 00:16:32.380 --> 00:16:34.960 It's nice to have it just come already. 00:16:34.960 --> 00:16:39.260 And if you could get, like, a true binary, then that would solve, I think that would really be something. 00:16:39.260 --> 00:16:49.280 Yeah, even internally, I mean, there were many people, I mean, since it's a longstanding company using C++, I mean, a couple of people that were recently joining the company when they first tried it. 00:16:49.280 --> 00:16:53.040 And then we said, like, I just pip installed PySight 2, and I have everything now from Python. 00:16:53.040 --> 00:16:55.000 I mean, which kind of magic is this? 00:16:55.000 --> 00:16:57.840 I mean, they were not even aware of, like, how fast can be. 00:16:57.840 --> 00:17:04.600 And I think this is one of the main reasons that why the Qt company wanted to officially support Python, right? 00:17:04.600 --> 00:17:09.140 Because, I mean, this is a podcast about Python, so we don't need to convince people about it. 00:17:09.380 --> 00:17:12.000 You would be surprised. 00:17:12.000 --> 00:17:18.820 There's a lot of people that listen that maybe Python is not their main language, or they're just getting started, and they're still exploring. 00:17:18.820 --> 00:17:19.860 You'd be surprised. 00:17:19.860 --> 00:17:32.340 So there's probably a lot of people who, you know, still, even if they've been doing Python for 20 years, maybe they're like, well, it's great for websites and backends, but I'm not going to build my UI in Python, right? 00:17:32.440 --> 00:17:34.500 So convince us, yeah, convince us by Python. 00:17:34.500 --> 00:17:36.320 I think it's great if you can do it. 00:17:36.320 --> 00:17:36.660 Yeah. 00:17:36.660 --> 00:17:41.400 Yeah, well, I mean, every single person that is touching code at some point is aware of Stack Overflow. 00:17:41.400 --> 00:17:48.500 And, for example, I remember that this year's Stack Overflow Insights were showing how popular Python was becoming. 00:17:48.500 --> 00:17:56.080 And after all these years, I remember back in the day that in the university, I was, like, there were the Perl people and the Python people. 00:17:56.080 --> 00:17:59.620 And, of course, all the Perl people are the devil, and we will not talk about Perl. 00:18:00.040 --> 00:18:14.420 But currently, you can see that even some index that, like, measure the amount of questions or, I don't know, search queries about programming, like the TOB index, for example, they were showing Python approaching the top three. 00:18:14.420 --> 00:18:15.000 Yeah. 00:18:15.000 --> 00:18:15.700 It's amazing. 00:18:15.700 --> 00:18:22.020 Not even that, not even, like, general users, because, I mean, I have also some background in academia when I was doing my PhD. 00:18:22.020 --> 00:18:28.080 I encountered that most of the old researchers were using programming languages like Fortran, for example. 00:18:28.080 --> 00:18:30.120 But all the new ones were using Python. 00:18:30.120 --> 00:18:38.480 And that's how we have now the IPython notebooks that now are called Jupyter project and all these data science-related things that it's mainly using with Python. 00:18:38.620 --> 00:18:45.680 I mean, and you cannot, like, expect for some, like, new position data science to ask for, I don't know, C or Fortran. 00:18:45.680 --> 00:18:47.380 That's really, really, really in the past. 00:18:47.380 --> 00:18:49.280 I think that's the key. 00:18:49.280 --> 00:18:54.320 This portion of Talk Python To Me is brought to you by Linode. 00:18:54.320 --> 00:18:58.260 Are you looking for bulletproof hosting that's fast, simple, and incredibly affordable? 00:18:58.260 --> 00:19:03.180 Look past that bookstore and check out Linode at talkpython.fm/Linode. 00:19:03.180 --> 00:19:05.100 That's L-I-N-O-D-E. 00:19:05.660 --> 00:19:09.580 Plans start at just $5 a month for a dedicated server with a gig of RAM. 00:19:09.580 --> 00:19:12.100 They have 10 data centers across the globe. 00:19:12.100 --> 00:19:14.640 So no matter where you are, there's a data center near you. 00:19:14.640 --> 00:19:19.860 Whether you want to run your Python web app, host a private Git server, or file server, 00:19:19.860 --> 00:19:29.980 you'll get native SSDs on all the machines, a newly upgraded 200-gigabit network, 24-7 friendly support, even on holidays, and a 7-day money-back guarantee. 00:19:29.980 --> 00:19:32.300 Do you need a little help with your infrastructure? 00:19:32.800 --> 00:19:38.540 They even offer professional services to help you get started with architecture, migrations, and more. 00:19:38.540 --> 00:19:41.620 Get a dedicated server for free for the next four months. 00:19:41.620 --> 00:19:44.460 Just visit talkpython.fm/Linode. 00:19:46.200 --> 00:19:46.640 Yeah. 00:19:46.640 --> 00:19:52.360 Is the Q company largely a C++ organization, given that a lot of the main product is in C? 00:19:52.360 --> 00:19:53.020 Yeah. 00:19:53.020 --> 00:19:53.280 Yeah. 00:19:53.280 --> 00:19:59.360 Of course, we have some automations and internal tools, but you can find that people knowing about many other programming languages. 00:19:59.580 --> 00:20:11.760 I mean, I know that they're like also Perl experts or guys using Python for automating tasks, or maybe they have some system built with Go and everything like that. 00:20:11.760 --> 00:20:17.840 But I mean, it's the majority of the users and the community around is like purely C++ experts. 00:20:17.960 --> 00:20:18.460 Right, right. 00:20:18.460 --> 00:20:28.560 I feel like the package management aspect, you know, pip install, anti-gravity, for example, type of things, really is something that Python brings. 00:20:28.560 --> 00:20:32.120 It's so special compared to, say, C and C++, right? 00:20:32.120 --> 00:20:36.460 It's just a different level of productivity entirely. 00:20:37.380 --> 00:20:38.060 Yeah, exactly. 00:20:38.060 --> 00:20:45.580 And that's one of the reasons that we're trying to use, for example, to try to, not to convince, but to bring Python to C++ developer. 00:20:45.580 --> 00:20:49.060 I mean, how fast something could be to start something. 00:20:49.060 --> 00:20:58.860 I mean, even if you want to have a small GUI that does something with clicking some buttons, you know that in C++, at least you have writing the code, compiling the code, and executing. 00:20:58.860 --> 00:21:05.280 And if you want to skip one of these steps, which is to just write your code and execute it, I think that's really amazing. 00:21:05.280 --> 00:21:12.180 And that's one of the main reasons why I started to even spread the word about Python in general when I was studying and my PhD also. 00:21:12.180 --> 00:21:15.420 And yeah, that's the main motivation that we currently have as a company. 00:21:15.420 --> 00:21:15.960 Yeah, that's cool. 00:21:15.960 --> 00:21:16.760 I agree. 00:21:16.760 --> 00:21:17.900 I think you missed a step. 00:21:17.900 --> 00:21:20.660 It's also the figure out why that seg fault is happening. 00:21:20.660 --> 00:21:24.240 Yeah, well, that's the thing. 00:21:24.360 --> 00:21:32.060 I mean, day by day, all the people at the team is dealing with all the seg faults just to provide users for a seg fault-free environment. 00:21:32.060 --> 00:21:34.460 I mean, you know, we're combining two worlds. 00:21:34.460 --> 00:21:37.940 I mean, we have the same nightmares that sometimes have happened. 00:21:37.940 --> 00:21:40.740 And on the other side, we have all the CPython structures. 00:21:40.740 --> 00:21:42.500 So we try to combine these two things. 00:21:42.500 --> 00:21:50.720 So debugging the development of Kube for Python is challenging, but at the same time, it's a nice source of knowledge. 00:21:50.720 --> 00:21:53.680 Yeah, so let's dig into how it works a little bit. 00:21:54.040 --> 00:21:58.120 And I want to follow up on this, you know, how you bridge these two worlds. 00:21:58.120 --> 00:21:59.980 There's a lot of interesting possibilities there. 00:21:59.980 --> 00:22:01.040 Yeah. 00:22:01.040 --> 00:22:10.840 So how do we go from Qt code, Qt headers, and widgets and stuff to generating what is at code level called PySide 2? 00:22:10.840 --> 00:22:17.880 Okay, so the thing that we do is that the original idea was to extract all this information from the Qt headers. 00:22:18.140 --> 00:22:19.920 And for this, we use Clang. 00:22:19.920 --> 00:22:28.920 And also we have some internal tool that's called Shiboken that allows us to modify these headers. 00:22:28.920 --> 00:22:35.940 Because, I mean, you know, sometimes you have in C++ some void star or, you know, some double star pointers and stuff like that. 00:22:36.080 --> 00:22:40.700 So we need to manually transform all these things and bring everything to the Python world. 00:22:40.700 --> 00:22:41.140 Right. 00:22:41.140 --> 00:22:44.060 Because Python doesn't have a void star star type, right? 00:22:44.060 --> 00:22:45.140 Exactly. 00:22:45.140 --> 00:22:52.020 So we need to do some black magic inside and under the hood that allows you to use the method that includes some void star things. 00:22:52.360 --> 00:22:52.940 Yeah, for sure. 00:22:52.940 --> 00:22:59.300 Okay, so there's the C++ definition of how to directly natively work with Qt. 00:22:59.300 --> 00:23:08.680 And then use this thing called Shiboken, which generates modules that interact that are basically for CPython that can then talk to it. 00:23:08.680 --> 00:23:13.680 So are you using like CFFI or the C API? 00:23:13.680 --> 00:23:14.660 How does that work? 00:23:14.660 --> 00:23:15.360 That's the magic. 00:23:15.520 --> 00:23:22.680 I mean, back in the day when the developers started with PySty, they started to use BoostPython that personally I know that I have been using. 00:23:22.680 --> 00:23:24.600 But I don't know if you have experience with it. 00:23:24.600 --> 00:23:25.120 I have not. 00:23:25.120 --> 00:23:25.960 No, what's BoostPython? 00:23:25.960 --> 00:23:27.780 BoostPython is just the same idea. 00:23:27.780 --> 00:23:31.900 And it allows you to generate bindings for Python from some C++ project. 00:23:31.900 --> 00:23:42.560 But the problem with this is that, and it was the main problem back then, is that there is a lot of use of templates in C++, which is one of the obscure areas of C++ world. 00:23:42.740 --> 00:23:46.140 And this also increased the size of the binaries that you're generating. 00:23:46.140 --> 00:23:51.200 So the developers back then, they said, okay, what is the best solution right now? 00:23:51.200 --> 00:23:54.120 Let's write our own binding generator. 00:23:54.120 --> 00:23:59.460 So it was heavily inspiring BoostPython and trying to remove the template situation. 00:23:59.460 --> 00:24:01.900 And there is this type system thing that I mentioned. 00:24:01.900 --> 00:24:07.460 It's just a pure XML file with some directives of modifying signatures, for example, of the methods. 00:24:07.880 --> 00:24:13.640 And then you can use this to generate the CPython code that you can compile and transform in Python module. 00:24:13.640 --> 00:24:13.960 Okay. 00:24:13.960 --> 00:24:15.080 It sounds very interesting. 00:24:15.080 --> 00:24:22.480 And I recently learned that you can take this, Shavokin, and you can apply it to any C library, potentially. 00:24:22.480 --> 00:24:24.660 It's not just for Q, right? 00:24:24.660 --> 00:24:28.320 So this could be a useful tool for people who actually don't care about UIs. 00:24:28.480 --> 00:24:29.140 Yes, exactly. 00:24:29.140 --> 00:24:36.180 I mean, as soon as we started to release the official set of wheels, we started to get people like, I want to generate the bindings for my project and everything. 00:24:36.180 --> 00:24:38.280 And yeah, it's possible to. 00:24:38.280 --> 00:24:46.260 I mean, I encourage people to take a look in our blog that there was a post there to write Python bindings for a C++ project without any queue on it. 00:24:46.820 --> 00:24:50.700 So, of course, I mean, it's something that is still under development and it's open source. 00:24:50.700 --> 00:24:52.880 So there is still some incompatibilities. 00:24:52.880 --> 00:25:00.080 For example, we have some issues with templates, if your project has some templates, and also maybe smart pointers and things like that. 00:25:00.080 --> 00:25:02.780 But in general, at least for us, it do the work. 00:25:02.960 --> 00:25:10.780 And we are planning now that once the release official releases out, that the open source community will react and will help us to improve Shavokin itself. 00:25:10.780 --> 00:25:13.180 Yeah, it sounds like a really useful tool on its own. 00:25:13.180 --> 00:25:21.900 Help me understand why or how this might differ from, saying, using something like Cython or something like that. 00:25:21.900 --> 00:25:28.900 Would another reasonable path be to write part of your code in Cython and directly interact with the C part? 00:25:29.300 --> 00:25:35.180 Well, Cython is just to, at least I use it just for optimizing some Python code. 00:25:35.180 --> 00:25:42.420 But since we needed to create this bridge, you know, to have this glue between C++ and Python world, I think that the generator was needed. 00:25:42.420 --> 00:25:47.580 And there are other options like that, I mean, out there that you mentioned, for example, the CFFI. 00:25:47.580 --> 00:25:50.520 And also there is a nice, what was the name of this module? 00:25:50.520 --> 00:25:57.260 PyBind 11, that also allows you to, you know, to generate the link between these two worlds. 00:25:57.440 --> 00:26:02.100 So I think that Shavokin will be one of the nice options out there. 00:26:02.100 --> 00:26:05.960 But still, I think that we need to, there's a lot of things to be done there. 00:26:05.960 --> 00:26:06.860 Yeah, yeah, of course. 00:26:06.860 --> 00:26:07.960 Okay, interesting. 00:26:07.960 --> 00:26:11.240 Let's talk first at a high level about what some of the modules are. 00:26:11.240 --> 00:26:13.760 You touched on this a little bit, but what do we get? 00:26:13.760 --> 00:26:17.140 What do we have to work with when we work with PySide 2? 00:26:17.140 --> 00:26:24.700 Yeah, well, it's sometimes can be really overwhelming for people to meet Qt in the sense of that there are so many things to do. 00:26:24.700 --> 00:26:36.720 But I mean, for the users that are starting with generating graphical user interfaces, we have like three main modules in Qt that are, of course, exposed in Qt for Python. 00:26:36.880 --> 00:26:44.280 So the Qt core, the one that has all the like basic definitions of types and classes that you will use. 00:26:44.280 --> 00:26:53.360 And then we have some GUI elements that, for example, you can encounter there some like debase of how a widget is created. 00:26:53.360 --> 00:26:56.580 For example, pixels or, you know, lines and stuff like that. 00:26:56.780 --> 00:27:02.680 And then you have widgets, which is the more general one that exposes, you know, pre-made things. 00:27:02.680 --> 00:27:06.220 Like if you have a button, a group box, a checkbox and everything. 00:27:06.220 --> 00:27:13.180 So usually all the examples code that we currently have, most of them use these three modules for different functionalities. 00:27:13.180 --> 00:27:18.920 But a normal user, I think I will play around Qt widgets and maybe Qt core for getting a few things. 00:27:18.920 --> 00:27:19.180 Right. 00:27:19.180 --> 00:27:22.120 You also have things like Qt charts, Qt multimedia. 00:27:22.120 --> 00:27:22.820 Yeah. 00:27:22.820 --> 00:27:24.260 And testing even, right? 00:27:24.260 --> 00:27:25.640 Yeah, well, that's the thing. 00:27:25.640 --> 00:27:32.560 I mean, there are many other modules that allow you to do things with Qt that sometimes are exposed in Python natively. 00:27:32.560 --> 00:27:40.960 For example, we decided to, there is a few mathematical modules that we decided not to expose to Qt for Python directly. 00:27:40.960 --> 00:27:47.040 Because, of course, you have the math module in Python or you have any other numerical library there. 00:27:47.040 --> 00:27:47.480 Right. 00:27:47.480 --> 00:27:51.040 So, but Qt charts, for example, is the one that gets more of our attentions. 00:27:51.040 --> 00:27:57.620 At least there is a couple of nice examples in our code base that really brings people to joy to say, oh, my God, yes, it's so easy. 00:27:57.620 --> 00:28:01.980 And they can combine it with any other numerical or data sources that they have. 00:28:01.980 --> 00:28:02.780 That's cool. 00:28:02.780 --> 00:28:12.840 So if I was doing like scikit, numpy, those types of things, I could take that data and visualize it and say like a Qt chart or something like that or a Qt chart. 00:28:12.960 --> 00:28:13.900 Yeah, yeah, exactly. 00:28:13.900 --> 00:28:16.840 I mean, that's one of the nice things that we are doing. 00:28:16.840 --> 00:28:32.860 Of course, since all the API that we use is C++ based, we are now in a moment of defining like how to break this API, but not in a bad sense, but in the sense of like bringing Qt for Python in a more compatible way for Python world. 00:28:32.860 --> 00:28:43.440 So nowadays, for example, there is a lot of research being done of like allowing numpy or scipy types into Qt methods and classes. 00:28:43.440 --> 00:28:48.200 No, that is awesome because it's in C, in numpy, for example, right? 00:28:48.200 --> 00:28:52.800 Like why does it have to go into Python, then back out into another C layer, right? 00:28:52.800 --> 00:28:56.140 Like if you could just say, hey, you're all down there, figure that out. 00:28:56.140 --> 00:28:57.060 Yeah, exactly. 00:28:57.060 --> 00:29:06.860 That's the thing that we need to see what is underneath all these amazing numpy arrays and see how we can make it compatible with the signatures of the method, for example. 00:29:06.860 --> 00:29:07.940 And pandas and whatnot. 00:29:07.940 --> 00:29:08.840 Yeah, that's really cool. 00:29:08.840 --> 00:29:09.160 Yeah, exactly. 00:29:09.160 --> 00:29:09.640 Yeah. 00:29:09.640 --> 00:29:10.020 All right. 00:29:10.020 --> 00:29:17.420 So one of the things that really appeals to me with building GUI applications is a visual designer. 00:29:17.420 --> 00:29:28.040 I know you can write code and I know you can specify it out, but being able to say, here's a button, I'm going to put that button next to that input box, you know, and just drag it there. 00:29:28.040 --> 00:29:31.140 And then like, I'd like to, you know, I have this method called when I click it. 00:29:31.180 --> 00:29:34.220 So I wire up a event to, you know, a callback to it. 00:29:34.220 --> 00:29:38.040 So the Qt project has something like this, right? 00:29:38.040 --> 00:29:38.820 Yeah, exactly. 00:29:38.820 --> 00:29:43.980 So there is a, we have our own IDE, which is called Qt Creator. 00:29:43.980 --> 00:29:53.260 And inside this IDE, I mean, I was, I confess, I mean, even when I started to work there, I was really not into this IDE because I prefer to use Veeam, for example. 00:29:53.660 --> 00:29:58.000 But I started to discover the amount of things that you can do inside and it's quite remarkable. 00:29:58.000 --> 00:30:01.780 I mean, it's my, for example, way to go for debugging applications nowadays. 00:30:01.780 --> 00:30:10.160 And, but now that you mentioned the designer, you also have the ability of design interfaces, like, you know, the principle, what you see is what you get. 00:30:10.160 --> 00:30:16.220 So you start to drag and drop things, move things around, then you generate some kind of scheme, right? 00:30:16.220 --> 00:30:22.040 So this scheme will be translated into a UI file, which is something, of course, internally of Qt. 00:30:22.040 --> 00:30:25.400 And then with this UI file, you can do as you want. 00:30:25.400 --> 00:30:30.260 I mean, you can use it in your C++ project or you can use it for Python, for example. 00:30:30.260 --> 00:30:35.080 You can load it dynamically or even generating some Python code from this UI file. 00:30:35.080 --> 00:30:40.400 This portion of Talk Python To Me is brought to you by Rollbar. 00:30:40.400 --> 00:30:41.820 Got a question for you. 00:30:41.820 --> 00:30:44.520 Have you been outsourcing your bug discovery to your users? 00:30:44.740 --> 00:30:47.180 Have you been making them send you bug reports? 00:30:47.180 --> 00:30:48.880 You know, there's two problems with that. 00:30:48.880 --> 00:30:50.860 You can't discover all the bugs this way. 00:30:50.860 --> 00:30:53.400 And some users don't bother reporting bugs at all. 00:30:53.400 --> 00:30:55.300 They just leave, sometimes forever. 00:30:55.300 --> 00:30:59.120 The best software teams practice proactive error monitoring. 00:30:59.120 --> 00:31:05.500 They detect all the errors in their production apps and services in real time and debug important errors in minutes or hours, 00:31:05.500 --> 00:31:07.500 sometimes before users even notice. 00:31:07.500 --> 00:31:12.580 Teams from companies like Twilio, Instacart, and CircleCI use Rollbar to do this. 00:31:12.860 --> 00:31:18.680 With Rollbar, you get a real-time feed of all the errors so you know exactly what's broken in production. 00:31:18.680 --> 00:31:25.860 And Rollbar automatically collects all the relevant data and metadata you need to debug the errors so you don't have to sift through logs. 00:31:25.860 --> 00:31:29.840 If you aren't using Rollbar yet, they have a special offer for you and it's really awesome. 00:31:30.380 --> 00:31:34.340 Sign up and install Rollbar at talkpython.fm/Rollbar. 00:31:34.340 --> 00:31:38.900 And Rollbar will send you a $100 gift card to use at the Open Collective, 00:31:38.900 --> 00:31:46.340 where you can donate to any of the 900 plus projects listed under the Open Source Collective or to the Women Who Code organization. 00:31:46.340 --> 00:31:49.980 Get notified of errors in real time and make a difference in Open Source. 00:31:50.240 --> 00:31:52.920 Visit talkpython.fm/Rollbar today. 00:31:54.520 --> 00:32:01.540 When you start talking about editors, that's a very sensitive thing for me as well, right? 00:32:01.540 --> 00:32:01.780 Yeah. 00:32:01.780 --> 00:32:07.320 It sounds to me like I can take the Qt Creator, which is what that IDE you're talking about is called, right? 00:32:07.320 --> 00:32:15.000 I can take that and I can define my UI files, but then I could still use my other editor to write the main code or something like this if I wanted. 00:32:15.180 --> 00:32:18.480 Well, I mean, yes, but again, that's another spoiler alert. 00:32:18.480 --> 00:32:23.780 No, but I mean, we are working on a proper integration with Qt Creator. 00:32:23.780 --> 00:32:28.460 At the moment, I mean, you can use it to code your applications and everything and everything is there. 00:32:28.460 --> 00:32:29.260 Syntax highlight. 00:32:29.260 --> 00:32:33.060 And now we have even some testing phase for auto-completion. 00:32:33.060 --> 00:32:38.020 But the problem is that we don't want to just provide a nice editor and that's it. 00:32:38.020 --> 00:32:43.380 I mean, we want to integrate more options and a more like a better integration with the Qt project. 00:32:43.620 --> 00:32:49.780 So just the thing that you mentioned about deployment or maybe transfer or creating base projects in Python. 00:32:49.780 --> 00:32:55.300 So everything of this is in our like to-do list of like what is the future of the project. 00:32:55.300 --> 00:33:00.620 So that's why we are so looking forward to releasing as soon as possible to start to work on these features. 00:33:00.620 --> 00:33:13.000 And now, I mean, lately in the last post that we have from Qt for Python, we had some intern that was working with us and he managed to, for example, even extend the same IDE, Qt Creator, with Python scripts. 00:33:13.400 --> 00:33:16.320 And this is something that is really new because in the past it was just C++. 00:33:16.320 --> 00:33:23.180 But now, since we have PySide 2, you are allowed or you will be allowed to modify the IDE even with Python. 00:33:23.180 --> 00:33:24.660 So we are Pythonizing everything. 00:33:24.660 --> 00:33:25.580 That is cool. 00:33:25.580 --> 00:33:30.700 So basically, I could write like extensions or plugins or whatever you call it for Qt Creator in Python. 00:33:30.700 --> 00:33:31.060 Exactly. 00:33:31.060 --> 00:33:31.940 Exactly. 00:33:31.940 --> 00:33:32.940 That's the idea. 00:33:32.940 --> 00:33:33.920 That's cool. 00:33:34.140 --> 00:33:42.660 So I guess that brings up another thought for me is, you know, so much of Qt is in C and the entire API is C++ based and whatnot. 00:33:42.660 --> 00:33:55.520 Do you see people writing part of their application in C++, but then maybe hosting the CPython runtime so that other people can extend their applications with Python? 00:33:55.520 --> 00:33:57.020 Or does that not really happen? 00:33:57.020 --> 00:33:57.700 Yeah. 00:33:57.700 --> 00:33:57.720 Yeah. 00:33:57.720 --> 00:34:04.280 To be honest, I mean, I was expecting less people doing this, but it's crazy by the amount of questions that we receive every day. 00:34:04.800 --> 00:34:20.400 Most of the people out there with some companies and even like some startups and stuff, they are trying to extend C++ application in the same idea that we are presenting for Qt Creator and they are trying to use PySide for it. 00:34:20.400 --> 00:34:28.100 So we have, for example, the same idea of writing plugins for your application is being done by any other project. 00:34:28.100 --> 00:34:33.660 One of our clients, for example, which is the graphical effects industry, it's called Autodesk. 00:34:33.660 --> 00:34:41.060 They also allow users to extend the application itself, writing the plugins with PySide. 00:34:41.060 --> 00:34:48.900 And also, like I have heard some stories of people also with some big C++ projects trying to allow users to write Python stuff. 00:34:48.900 --> 00:34:51.020 So, yeah, this is totally possible. 00:34:51.020 --> 00:34:51.360 Okay. 00:34:51.360 --> 00:34:52.460 How interesting. 00:34:52.460 --> 00:35:00.140 So I guess some other areas you might try to work on is we talked about embedded systems a little bit. 00:35:00.140 --> 00:35:01.080 What about mobile? 00:35:01.080 --> 00:35:01.800 Yeah. 00:35:01.800 --> 00:35:09.440 Well, mobile is something that every time that we go to some conference or talk, there is the question about what about mobile support? 00:35:09.440 --> 00:35:12.020 People pull up their phone and they're like, here. 00:35:12.020 --> 00:35:12.240 Exactly. 00:35:12.240 --> 00:35:13.640 I want it here. 00:35:13.640 --> 00:35:15.460 Billions of people are here. 00:35:15.460 --> 00:35:16.100 How do I do this? 00:35:16.100 --> 00:35:17.400 Are you working on this? 00:35:17.400 --> 00:35:17.620 Yeah. 00:35:17.620 --> 00:35:23.220 Well, this is something that at least would be like also another thing in our to-do list. 00:35:23.220 --> 00:35:26.240 But we are focusing on the previous topic before. 00:35:26.240 --> 00:35:28.260 But, yeah, it's something that we need to do. 00:35:28.260 --> 00:35:29.040 We need to achieve. 00:35:29.040 --> 00:35:34.740 I mean, at the moment, you have the option to go around with iOS or Android with Qt. 00:35:34.880 --> 00:35:39.040 There are some options, even in Qt Creator to deploy C++ applications to it. 00:35:39.040 --> 00:35:42.220 But, yeah, it's something that is really pending on us. 00:35:42.220 --> 00:35:44.940 But it's something that we totally would like to do. 00:35:44.940 --> 00:35:53.520 Because even though if you don't have the same feeling and you cannot compete with a native stuff like Android and Java and stuff, there's a lot of things to be done there. 00:35:53.520 --> 00:36:04.920 I mean, you can see, like, all the revolution that Kotlin has after it was introduced in Android that, of course, is kind of getting rid of all the Java ugly code and bringing some new stuff on it. 00:36:04.920 --> 00:36:08.200 So, yeah, we are totally going to be a part of that movement, too. 00:36:08.340 --> 00:36:11.700 I would love for you guys to be part of that if you're bringing Python along for the party. 00:36:11.700 --> 00:36:12.220 That'd be cool. 00:36:12.220 --> 00:36:26.640 It's really kind of surprising to me that Kotlin, which is a language created by JetBrains, maybe the last five years, it's not very old, actually almost displaced Java over in the Android space, which is quite interesting. 00:36:26.640 --> 00:36:30.720 Yeah, I mean, if you have some experience with Java, I mean, you will understand the pain. 00:36:30.720 --> 00:36:32.800 I mean, sadly, I have some experience, too. 00:36:33.700 --> 00:36:37.380 But, I mean, it was really frustrating even to writing small pieces of code. 00:36:37.380 --> 00:36:47.600 And at least for me, Kotlin, I always have the same idea that the person behind Kotlin, the people behind Kotlin, like, really decided to write something in a more Python-y way. 00:36:47.600 --> 00:36:48.940 I mean, we cannot deny it. 00:36:48.940 --> 00:36:51.120 I mean, it really has a lot of Python on it. 00:36:51.120 --> 00:36:54.320 And even the way of writing some stuff is like, hmm, this sounds like Python. 00:36:54.320 --> 00:36:59.860 So, yeah, I'm pretty sure that they tried and they had Python in mind when trying to write it. 00:36:59.860 --> 00:37:00.840 Yeah, interesting. 00:37:00.840 --> 00:37:02.560 I really haven't done very much with Kotlin. 00:37:02.700 --> 00:37:03.880 So, maybe I should check it out. 00:37:03.880 --> 00:37:04.800 Yeah, it's quite nice. 00:37:04.800 --> 00:37:05.420 It sounds interesting. 00:37:05.420 --> 00:37:06.480 Yeah, there was an article. 00:37:06.480 --> 00:37:08.040 I can't remember where it was. 00:37:08.040 --> 00:37:15.600 It was on some major unexpected, you know, magazine or news source that was talking about the future of programming languages. 00:37:15.600 --> 00:37:22.460 And it says, you know, one of the predictions was that Python is going to be the great-grandfather of many, many programming languages. 00:37:22.460 --> 00:37:24.420 I think that's probably true. 00:37:24.420 --> 00:37:25.600 And this sounds a little bit like that. 00:37:25.600 --> 00:37:26.520 You have Swift as well. 00:37:26.520 --> 00:37:27.600 Yeah, yeah, yeah. 00:37:27.600 --> 00:37:28.180 Right, exactly. 00:37:28.340 --> 00:37:36.440 Well, I haven't tried Swift, but I think it's, yeah, Python is a whole new starting point for the future generations and programming. 00:37:36.440 --> 00:37:39.660 Because it's bringing something that is simplicity, right? 00:37:39.660 --> 00:37:43.780 I mean, you know, I mean, the first time that I encountered Python, it was so easy to do things. 00:37:43.940 --> 00:37:51.540 I mean, you didn't even know, like, oh, there was a semicolon or what, or, you know, open brackets, closing brackets, or what is the stars? 00:37:51.540 --> 00:37:52.420 Yeah. 00:37:52.420 --> 00:37:53.160 You know, it was simple. 00:37:53.160 --> 00:37:55.600 That's the way that people started moving for, yeah. 00:37:55.740 --> 00:38:06.100 It's so interesting that when you come from one of these C-based languages or something like C++, C#, Java, whatever, even JavaScript, you feel like, oh, all these curly braces are required. 00:38:06.100 --> 00:38:09.180 All these parentheses around the if statement are required. 00:38:09.180 --> 00:38:15.020 And then you come work on Python, and, you know, it's a bit of a shock to the system, for sure. 00:38:15.020 --> 00:38:16.900 You're like, wait a minute, spacing matters? 00:38:16.900 --> 00:38:18.020 There's no curly braces? 00:38:18.020 --> 00:38:18.540 Where's it? 00:38:19.040 --> 00:38:24.140 But then, you know, after just a week, if you go back to the other language, you're like, what is all this stuff? 00:38:24.140 --> 00:38:24.740 Like, you're right. 00:38:24.740 --> 00:38:27.600 These parentheses here are not necessary. 00:38:27.600 --> 00:38:29.140 Why do I have to type all this stuff? 00:38:29.140 --> 00:38:29.920 Yes. 00:38:29.920 --> 00:38:35.360 And I remember back in the university, even teaching C, it was really a nightmare. 00:38:35.360 --> 00:38:40.020 Because, I mean, we all write code and even write normal, like, with handwriting and stuff differently. 00:38:40.020 --> 00:38:45.740 But having this space requirements, it's something that is so enlightened for writing code. 00:38:45.900 --> 00:38:49.100 And, I mean, it's really difficult to write ugly Python code. 00:38:49.100 --> 00:38:55.440 But I have seen, like, I mean, maybe you're aware of even, like, these obfuscated code tournaments that you have. 00:38:55.440 --> 00:38:57.060 Yes, that's so interesting. 00:38:57.060 --> 00:38:58.280 Yeah, tell people about that. 00:38:58.280 --> 00:39:02.060 Because I remember just being blown away from it. 00:39:02.060 --> 00:39:08.520 Well, the whole idea of obfuscated code is that to write code that can, when you see the code, it resembles something. 00:39:08.520 --> 00:39:12.320 And usually are really cryptic things and moving bytes around and stuff. 00:39:12.520 --> 00:39:19.520 And, for example, I remember the one more shocking to me was something about, like, a circle made with dots and a slash and stuff like that. 00:39:19.520 --> 00:39:24.280 And then when you compile the circle and you execute it, you get the value of P. 00:39:24.280 --> 00:39:25.480 And I was like, what? 00:39:25.480 --> 00:39:26.920 That is beautiful. 00:39:26.920 --> 00:39:28.360 It's really weird. 00:39:28.360 --> 00:39:34.160 I mean, with Python, I mean, luckily we will not have this kind of obfuscated tournaments or something. 00:39:34.160 --> 00:39:35.380 Because that would be a nice thing. 00:39:35.380 --> 00:39:38.340 Yeah, it definitely goes against the Xen of Python for sure. 00:39:38.340 --> 00:39:39.100 Totally. 00:39:39.100 --> 00:39:39.800 Really cool. 00:39:39.800 --> 00:39:55.180 So, speaking of styles and stuff coming together and worlds clashing, something that was surprising to me and I'd like to ask you about is when I look at the PySide 2 or just PySide, the APIs here, they all look C style. 00:39:55.180 --> 00:40:03.080 You know, lowercase first variable and then uppercase second as the first letter, then uppercase second, like, compacted word or composite word. 00:40:03.080 --> 00:40:03.720 Yeah. 00:40:03.720 --> 00:40:07.540 As opposed to snake, you know, in the snake case with the underscores and all lowercase. 00:40:07.760 --> 00:40:12.940 So, what's the story with this semi-non-Pythonic Python API? 00:40:12.940 --> 00:40:14.520 This is really a hot topic. 00:40:14.520 --> 00:40:22.960 Every time that I bring the talk about Qt for Python with C++ developers, Java developers, or even Python developers, everyone is hard to fight to each other. 00:40:22.960 --> 00:40:42.600 Because there is some things that we cannot break in the sense of, like, the reason, for example, for keeping the camel case for the Qt API is because every person that already knows Qt or has some project in Qt, it will be so easy for them to just rewrite code in a Python way using the same API. 00:40:42.600 --> 00:40:49.480 Because if we start to replace all the camel cases for underscore, which is the Python way of doing it, we will break everything. 00:40:49.740 --> 00:40:56.500 And people will start to run examples, for example, from C++, and will be unable to decipher how to write these things in Python. 00:40:56.500 --> 00:40:58.580 So, we said, okay, we need to settle somewhere. 00:40:58.580 --> 00:41:02.780 So, everything, every time that we use the Qt API, we'll use camel case. 00:41:02.780 --> 00:41:09.200 But everything else will be following all the peps that we want and the Python styling. 00:41:09.200 --> 00:41:11.700 So, that's why the examples look a little bit mixed. 00:41:11.700 --> 00:41:16.620 But, yeah, I mean, I think it is the best balance for the two worlds. 00:41:16.620 --> 00:41:18.520 And we are not the ones, the only ones. 00:41:18.580 --> 00:41:21.040 I think that there is asyncio or I don't know. 00:41:21.040 --> 00:41:23.880 There is another module in Python that uses camel case for the API. 00:41:23.880 --> 00:41:24.840 I'm not sure about it. 00:41:24.840 --> 00:41:26.880 But, I mean, I think that is a nice solution. 00:41:26.880 --> 00:41:28.780 Yeah, I have seen it before. 00:41:28.780 --> 00:41:30.240 I can't remember where it was either. 00:41:30.240 --> 00:41:32.940 But I'm like, wait, why is this library, you know, got this style? 00:41:32.940 --> 00:41:34.660 And I think it was in the standard library. 00:41:34.660 --> 00:41:36.360 That's funny. 00:41:36.360 --> 00:41:37.460 Ian, that makes sense to me. 00:41:37.460 --> 00:41:38.660 It's a bit of a trade-off, right? 00:41:38.660 --> 00:41:42.240 Like, you've already got this code that exists. 00:41:42.240 --> 00:41:47.860 And if you're going to generate it, there's this sort of easiest to generate exactly the same names. 00:41:47.860 --> 00:41:51.220 If you don't have to necessarily do the documentation as differently. 00:41:51.220 --> 00:41:51.800 Yeah. 00:41:51.800 --> 00:41:58.560 And even for us, for translating examples, for example, we have like, we graph any function written in C++. 00:41:58.800 --> 00:42:00.200 Then we copy it to the Python. 00:42:00.200 --> 00:42:01.220 We remove the brackets. 00:42:01.220 --> 00:42:02.340 We check the consistency. 00:42:02.340 --> 00:42:04.040 We remove all the semicolons. 00:42:04.040 --> 00:42:04.680 And that's it. 00:42:04.680 --> 00:42:05.520 I mean, there you have it. 00:42:05.520 --> 00:42:07.120 Look at all the complicated stuff. 00:42:07.120 --> 00:42:07.920 You take it away. 00:42:07.920 --> 00:42:12.380 All the unnecessary symbolic stuff that's hanging around. 00:42:12.380 --> 00:42:12.840 And look. 00:42:12.840 --> 00:42:14.300 It's the Python version. 00:42:14.300 --> 00:42:15.440 Interesting. 00:42:15.440 --> 00:42:16.140 Yeah. 00:42:16.140 --> 00:42:20.740 I've seen other frameworks like where they have something. 00:42:20.740 --> 00:42:22.700 Ultimately, it's a C API underneath. 00:42:22.700 --> 00:42:24.220 And it supports different languages. 00:42:24.220 --> 00:42:28.420 And they've taught basically the equivalent of their Shibokin to say, 00:42:28.540 --> 00:42:30.400 if I'm generating Python, it looks like this. 00:42:30.400 --> 00:42:34.080 If I'm generating JavaScript, JavaScript has this coding convention. 00:42:34.080 --> 00:42:36.780 But I can see the argument also for just saying, 00:42:36.780 --> 00:42:40.400 most of the people who are coming to this world are coming from the C++ world. 00:42:40.400 --> 00:42:41.660 And their code looks like this. 00:42:41.660 --> 00:42:43.680 Let's not shock them too much. 00:42:43.680 --> 00:42:44.340 Yeah, exactly. 00:42:44.340 --> 00:42:44.980 Totally. 00:42:44.980 --> 00:42:45.220 Yeah. 00:42:45.220 --> 00:42:46.720 But you have this debate often, huh? 00:42:46.720 --> 00:42:47.060 Yeah. 00:42:47.060 --> 00:42:47.320 I know. 00:42:47.320 --> 00:42:51.900 It's something that is, even when we are writing the code base of the projects, 00:42:51.900 --> 00:42:56.560 we have people that are really into Python, people that really comes from C++. 00:42:56.820 --> 00:43:02.100 So when we are doing all the code reviews, we start to clash, you know, between like, 00:43:02.100 --> 00:43:03.200 ah, you need to live in a space. 00:43:03.200 --> 00:43:04.840 No, it's not CPython standard. 00:43:04.840 --> 00:43:06.460 No, that's C++ standard. 00:43:06.460 --> 00:43:09.060 So we need to even agree with you among us. 00:43:09.060 --> 00:43:09.440 So yeah. 00:43:09.440 --> 00:43:10.260 Yeah. 00:43:10.260 --> 00:43:10.800 Interesting. 00:43:11.400 --> 00:43:17.920 So one thing that I saw showing up in the documentation and the API and stuff was this 00:43:17.920 --> 00:43:19.840 thing called signals and slots. 00:43:19.840 --> 00:43:20.420 Yeah. 00:43:20.420 --> 00:43:22.020 What's this and how does this look in Python? 00:43:22.020 --> 00:43:22.740 So yeah. 00:43:22.740 --> 00:43:25.760 I mean, signals and slots are the base of queued. 00:43:25.760 --> 00:43:32.540 So the idea behind this is that we treat every single element of the interface and also underneath 00:43:32.540 --> 00:43:34.740 as an object, as a queue object. 00:43:34.980 --> 00:43:38.300 So these objects can interact between them. 00:43:38.300 --> 00:43:41.000 And the idea of signals and slots is like that. 00:43:41.000 --> 00:43:44.760 I mean, an object will have something that will trigger something else. 00:43:44.760 --> 00:43:46.620 So let's put it like simple. 00:43:46.620 --> 00:43:50.200 If you have a button, then a button is also a queue object. 00:43:50.200 --> 00:43:54.380 And this button will have a special signal that it will call, for example, clicked. 00:43:54.380 --> 00:43:56.380 Of course, because you can click the button. 00:43:56.720 --> 00:43:59.700 And then this click signal will trigger something else. 00:43:59.700 --> 00:44:05.460 So then you can have another function or method, or what you want to call it, that will be the 00:44:05.460 --> 00:44:06.060 slot of it. 00:44:06.060 --> 00:44:08.780 So every time that you click the button, you will do something. 00:44:08.780 --> 00:44:10.560 So it's a really basic principle. 00:44:10.560 --> 00:44:14.080 But I mean, this is the base of the whole Qt framework. 00:44:14.080 --> 00:44:18.380 So that will be roughly the same in Qt for Python. 00:44:18.380 --> 00:44:20.040 And we follow the same idea. 00:44:20.040 --> 00:44:22.440 We are not adding new signals or removing old ones. 00:44:22.440 --> 00:44:24.000 I mean, it's just keeping the same API. 00:44:24.000 --> 00:44:26.340 So that's really nice of it. 00:44:26.520 --> 00:44:27.020 Yeah, okay. 00:44:27.020 --> 00:44:33.800 So this is a way to basically wire up functions to be called for user interface events. 00:44:33.800 --> 00:44:35.020 Mouse over, click, whatever. 00:44:35.020 --> 00:44:35.520 Exactly. 00:44:35.520 --> 00:44:38.800 The hover, trigger, everything, like check, everything. 00:44:38.800 --> 00:44:46.880 So what's the performance look like if I've got a non-trivial C++ application written in Qt, 00:44:46.880 --> 00:44:54.560 and then I were to rewrite that in Qt for Python, what would my experience be like? 00:44:54.560 --> 00:45:00.160 For general applications, like even big ones, like for example, a browser. 00:45:00.160 --> 00:45:06.100 Personally, I haven't performed any like a real test, you know, which are milliseconds, etc. 00:45:06.200 --> 00:45:12.740 But I kind of noticed any like lag or delays on having something written in Python. 00:45:12.740 --> 00:45:20.200 And the only problem with time that will come will see something only if you are writing Python code that is slow. 00:45:20.440 --> 00:45:27.280 So if you start to iterate a list of lists in the wrong way and then are accessing all the time to all the data, 00:45:27.280 --> 00:45:32.020 maybe you will of course encounter some bad speedup for your application. 00:45:32.260 --> 00:45:40.820 But roughly, for example, there is a couple of browsers are reading as an example inside a Qt code that we had the Python version, 00:45:40.820 --> 00:45:45.120 and we couldn't notice like any difference of like executing the C++ and the Python versions, 00:45:45.120 --> 00:45:46.440 because they're quite simple. 00:45:46.440 --> 00:45:53.440 And there's again fast, because after all, I mean, we are just calling the C++ methods and functions underneath. 00:45:53.680 --> 00:45:55.760 That's a really interesting bit there. 00:45:55.760 --> 00:46:01.280 I feel like when people talk about performance of Python, a lot of times they say, oh, it's way slower than C or whatever. 00:46:01.280 --> 00:46:06.780 But much of the time, if you're doing say like data science stuff, or in the case of Qt, 00:46:06.780 --> 00:46:13.140 you're doing a little bit of Python orchestration around objects that are executing in C directly, right? 00:46:13.140 --> 00:46:18.980 So like in your web browser example, you might say like if somebody types in the address bar and hits enter, 00:46:18.980 --> 00:46:23.620 you want it to drive the web browser widget to go to that address. 00:46:23.620 --> 00:46:32.140 But really the only Python code that executes is got a string, tell the C library to go drive the thing to this URL, right? 00:46:32.140 --> 00:46:38.080 And so it's only if you're actually doing like lots of computation directly in Python, right? 00:46:38.220 --> 00:46:44.600 Yeah, I think most of these statements come from people that really are not really experienced on Python in the sense of like, 00:46:44.600 --> 00:46:48.740 they try to rewrite Java or C++ code in the same way. 00:46:48.740 --> 00:46:54.780 So you are aware of it that, of course, that if you write, for example, iterations on Python list or list comprehension, 00:46:54.780 --> 00:46:59.720 or maybe you have some ways of optimizing your code, you can even reach like the same levels. 00:46:59.720 --> 00:47:04.880 And I think that this will just depend on the amount of knowledge that the user can have, right? 00:47:04.880 --> 00:47:11.240 Because I mean, of course, if you translate any C++ application with a lot of loops and everything into Python, it would be way slower. 00:47:11.240 --> 00:47:15.240 So we need to rethink the algorithms to use Python in a better way. 00:47:15.240 --> 00:47:15.780 Yeah, for sure. 00:47:15.780 --> 00:47:17.360 And I brought up the import anti-gravity. 00:47:17.360 --> 00:47:23.500 You know, so much of what I think would happen if you're coming from one of these other libraries 00:47:23.500 --> 00:47:28.540 that doesn't have as many foundational things to use is you just copy the code over 00:47:28.540 --> 00:47:30.840 and then you try to execute it on CPython. 00:47:31.160 --> 00:47:38.020 But instead of maybe some great big loop, you pip install a thing that has some optimized part of it and you just call that, right? 00:47:38.020 --> 00:47:40.240 And that completely changes the story. 00:47:40.240 --> 00:47:41.760 So it's pretty interesting. 00:47:41.760 --> 00:47:47.580 So you think it's a pretty reasonable thing to do to write acute application, GUI applications in Python. 00:47:47.580 --> 00:47:49.520 It's not going to be a complete night and day thing? 00:47:49.520 --> 00:47:50.240 Yeah, totally. 00:47:50.400 --> 00:47:52.040 I mean, at least that's my personal opinion. 00:47:52.040 --> 00:48:00.920 I'm looking forward for having some real cases of people that are doing like really weird things about like populating tables of like 1 million by time, 1 million. 00:48:00.920 --> 00:48:02.980 And they have some speed issues. 00:48:02.980 --> 00:48:05.040 But I think that we are open to it. 00:48:05.040 --> 00:48:08.480 We had a case recently of there was a bug. 00:48:08.480 --> 00:48:11.800 There was some person that was populating a table. 00:48:11.800 --> 00:48:16.420 I think like 100 times on the table was like a huge. 00:48:16.420 --> 00:48:20.340 And of course, I mean, the user brought the bug on it. 00:48:20.340 --> 00:48:22.980 But I mean, we didn't understand what was the real use of this. 00:48:22.980 --> 00:48:25.560 But we were quite open about it. 00:48:25.560 --> 00:48:34.720 And then we decided to start to optimize our code and some C++, even optimizations, for example, going to vectors instead of list and things like this. 00:48:34.720 --> 00:48:36.340 So we were quite open about it. 00:48:36.340 --> 00:48:41.460 And every time that someone brings some speed issues to the IRC channel, we try to figure it out and try to solve it. 00:48:41.460 --> 00:48:42.540 Seems like you're doing a good job. 00:48:42.540 --> 00:48:43.320 It sounds great. 00:48:43.320 --> 00:48:44.080 All right. 00:48:44.080 --> 00:48:45.400 Are you ready for a tough question? 00:48:45.400 --> 00:48:46.140 Yes, I am. 00:48:46.140 --> 00:48:46.800 All right. 00:48:46.800 --> 00:48:54.700 So you said that this is available for open source projects for free or there's a license that I can buy. 00:48:54.700 --> 00:48:58.720 So for open source license, for open source, it's under what? 00:48:58.720 --> 00:48:59.460 GPL? 00:48:59.460 --> 00:49:00.340 LGPL? 00:49:00.340 --> 00:49:01.220 LGPL. 00:49:01.220 --> 00:49:01.780 LGPL. 00:49:02.000 --> 00:49:07.060 So if I write, like, let's suppose I write a database management application, right? 00:49:07.060 --> 00:49:11.060 I want to have a new designer and graphical designer for, like, working with databases. 00:49:11.060 --> 00:49:13.620 I'm going to write that in Qt for Python. 00:49:13.620 --> 00:49:16.880 That would mean my application would have to be open source. 00:49:16.880 --> 00:49:19.380 Well, I mean, that's just following the LDPL. 00:49:19.380 --> 00:49:20.540 Right. 00:49:20.540 --> 00:49:20.960 So, yeah. 00:49:20.960 --> 00:49:23.000 But if I don't want that, what do I do? 00:49:23.000 --> 00:49:24.960 If I want to sell that product, for example. 00:49:24.960 --> 00:49:25.760 That's the thing. 00:49:25.760 --> 00:49:31.700 I mean, since, of course, Qt is based on this open source idea, but we're also a company. 00:49:31.700 --> 00:49:35.980 We need to have some customers with some, you know, support and everything. 00:49:35.980 --> 00:49:38.860 We sell license for commercial use. 00:49:38.860 --> 00:49:44.860 So this will allow you to build whatever you want in Qt and sell it as your own product and everything. 00:49:45.100 --> 00:49:59.560 So that's one of the things that the Qt for Python project will bring to new customers that with the same license, you will be allowed to build any application using the PySide 2 module and sell it if your business is about it. 00:49:59.560 --> 00:50:01.460 So that's one of the nice things. 00:50:01.460 --> 00:50:06.500 And, of course, and always, we will keep all the code open source and LGPL related. 00:50:06.500 --> 00:50:07.060 So, yeah. 00:50:07.140 --> 00:50:07.360 Right. 00:50:07.360 --> 00:50:07.680 Okay. 00:50:07.680 --> 00:50:09.260 What does that cost me? 00:50:09.260 --> 00:50:17.060 I really don't know the prices at the moment, but I can point you to any salesperson. 00:50:17.060 --> 00:50:17.520 Yeah, yeah. 00:50:17.520 --> 00:50:23.740 No, but it really depends, I think, the size of the amount of licenses that you want to buy. 00:50:23.740 --> 00:50:25.360 Do you know how it's apportioned? 00:50:25.360 --> 00:50:27.920 Like, is it the number of customers I have? 00:50:27.920 --> 00:50:30.220 Is it the number of developers working on the project? 00:50:30.220 --> 00:50:31.480 I really don't know about it. 00:50:31.480 --> 00:50:36.160 I think that it's based on the developers, but I don't know that well either. 00:50:36.160 --> 00:50:36.500 Okay. 00:50:37.040 --> 00:50:41.280 But there is a, if I want to build commercial applications, there's a path for that. 00:50:41.280 --> 00:50:43.780 And if I want to build open source applications, there's a path for that. 00:50:43.780 --> 00:50:44.440 Exactly. 00:50:44.440 --> 00:50:45.140 Okay. 00:50:45.140 --> 00:50:46.500 Well, that sounds good. 00:50:46.500 --> 00:50:54.580 I guess, you know, you've touched on some of these things, but maybe just give you a chance to summarize it or bring anything we haven't mentioned yet. 00:50:54.580 --> 00:50:56.300 Where's this going? 00:50:56.300 --> 00:51:03.420 So, at the end of the year-ish, we're going to have Qt 5.12 with Qt for Python out and things like that. 00:51:03.420 --> 00:51:04.140 Then what? 00:51:04.140 --> 00:51:04.960 So, yeah. 00:51:05.060 --> 00:51:12.100 I mean, the future that the only restriction that we currently have, the only constraint is that we would like to have more people on board about it. 00:51:12.760 --> 00:51:14.600 Because we have a lot of ideas. 00:51:14.600 --> 00:51:17.960 And, but we don't have enough time as usual. 00:51:18.280 --> 00:51:18.880 So, yeah. 00:51:18.880 --> 00:51:18.880 So, yeah. 00:51:18.880 --> 00:51:24.080 I mean, our number one, I think, task is the Qt creator integration. 00:51:24.080 --> 00:51:33.720 So, to have a proper IDE to be compatible with Qt and then to be able to deploy the applications and try to have everything on the same ecosystem, right? 00:51:33.720 --> 00:51:38.260 I mean, the designer and then build your UI files into Python files and everything. 00:51:38.460 --> 00:51:40.320 So, I think that's one of the high priority. 00:51:40.320 --> 00:51:45.760 And this comes, of course, at the hands of all the deployment aspects that we want to cover. 00:51:45.760 --> 00:51:50.780 After that, it really will be depending on the users that we have. 00:51:50.780 --> 00:51:52.660 I mean, we are really, really open about it. 00:51:52.660 --> 00:51:58.460 And every time on IRC, sometimes we ask, what do you think that would be better for the next step? 00:51:58.700 --> 00:52:04.700 Personally, I mean, I would like to go into, after the Qt creator and deployment, maybe for embedded system. 00:52:04.700 --> 00:52:12.020 Because I have been approached by many people that says, I have this Raspberry Pi, I have an application, and I really want to start to use Qt for Python. 00:52:12.020 --> 00:52:13.540 So, please, what do I need to do? 00:52:13.540 --> 00:52:15.400 So, there are a lot of people doing this. 00:52:15.400 --> 00:52:23.280 And after that, after embedded system, which is one of the strong features of Qt, I think that we should, we can totally go to mobile. 00:52:23.500 --> 00:52:30.180 Because I think it is something that people is asking for, and currently with the development of them, it's a smartphone that we get every day and everything. 00:52:30.180 --> 00:52:38.000 It's something that would be really nice to combine having your Qt desktop application, but also run on mobile, tablets, and phones, and everything. 00:52:38.000 --> 00:52:48.480 I think if you guys can nail the deployment thing, I push a button and I have a macOS.app that I can give to people, that would be a game changer. 00:52:49.020 --> 00:52:59.980 Similarly, if you say, I can push a button, and here's the thing I put in the iOS or Android app store, Google Play, also, you know, massively a game changer. 00:52:59.980 --> 00:53:05.320 So, I'm excited to hear this, and I wish you good luck on the journey, because we all need it. 00:53:05.320 --> 00:53:06.060 Yeah, thank you. 00:53:06.060 --> 00:53:07.300 Yeah, pretty cool. 00:53:07.300 --> 00:53:11.320 All right, well, I think we've pretty much covered the topic. 00:53:11.320 --> 00:53:14.620 I know there's a lot more we could go into, but it's a good introduction for people. 00:53:15.400 --> 00:53:18.280 So, Q for Python, I'm super excited that you all are working on it. 00:53:18.280 --> 00:53:21.300 Let me ask you the two questions before you get out of here. 00:53:21.300 --> 00:53:24.360 If you're going to write some Python code, what editor do you use? 00:53:24.360 --> 00:53:25.520 Vim, forever. 00:53:25.520 --> 00:53:26.820 I cannot get out of it. 00:53:26.820 --> 00:53:28.200 No, no. 00:53:28.200 --> 00:53:29.460 Yeah, have you tried? 00:53:29.460 --> 00:53:38.960 I mean, I usually recommend for people starting it to use, there is nice, like Eric, for example, this small IDE or Visual Code or PyCharm, for example. 00:53:38.960 --> 00:53:44.940 But if you, I mean, I am really used to Vim, so I cannot get out of it in all sense. 00:53:44.940 --> 00:53:46.040 So, please, if you know, help me. 00:53:46.040 --> 00:53:48.940 No, but it's my ecosystem. 00:53:48.940 --> 00:53:52.760 So, I think that's the only thing that I require to do everything. 00:53:52.760 --> 00:53:53.480 Yeah, cool. 00:53:53.480 --> 00:54:01.700 And then notable PyPI packages, maybe not necessarily the most popular, but one that you've come across, like, oh, people should know about this. 00:54:02.060 --> 00:54:03.760 Yeah, well, of course, PySci2. 00:54:03.760 --> 00:54:04.720 Of course. 00:54:04.720 --> 00:54:12.440 No, but during my studies, I think that all this, the SciPy suite is something that is, it was a must. 00:54:12.440 --> 00:54:16.740 I mean, I couldn't do anything without NumPy, MatplotLeave, all these things. 00:54:16.740 --> 00:54:22.040 So, I am really trying to follow in all the developments of data science, for example, or the Jupyter notebooks. 00:54:22.040 --> 00:54:25.300 I think that those are amazing for the Python community. 00:54:25.300 --> 00:54:34.560 And lately, I think that the other day, listening to one of your podcasts, I discovered black for modifying the code, and it was really a game changer. 00:54:34.560 --> 00:54:35.780 Yeah, black is cool. 00:54:35.780 --> 00:54:37.960 Because it had a couple of files, and it was really, really nice. 00:54:37.960 --> 00:54:38.300 So, yeah. 00:54:38.300 --> 00:54:38.560 Cool. 00:54:38.560 --> 00:54:39.780 Those are definitely good ones. 00:54:39.780 --> 00:54:41.140 All right, Christian. 00:54:41.140 --> 00:54:43.280 People are excited about Qt for Python. 00:54:43.280 --> 00:54:44.500 Final call to action. 00:54:44.500 --> 00:54:44.940 What do they do? 00:54:44.940 --> 00:54:45.720 So, okay. 00:54:45.720 --> 00:54:52.500 So, at the moment, you can go to your terminal and just install PySci2 and start to try all the examples that we have inside. 00:54:52.500 --> 00:54:54.260 We are quite active on IRC. 00:54:54.420 --> 00:54:58.720 I personally promise you that I will be there at least in working hours or something. 00:54:58.720 --> 00:55:01.080 But I try to answer all the questions. 00:55:01.080 --> 00:55:05.160 We have a lot of users since we started the first wheel set. 00:55:05.160 --> 00:55:08.900 So, if you have any questions, just go on IRC, and we will be there. 00:55:08.900 --> 00:55:16.540 And also, it's quite important now that by the end of the year, we have the Qt World Summit, which is the yearly event of Qt. 00:55:16.540 --> 00:55:19.560 A lot of people go there, all the clients, all the new users, everything. 00:55:20.160 --> 00:55:21.260 And we have two dates. 00:55:21.260 --> 00:55:24.500 One is in Boston, the 29th and 30th of October. 00:55:25.040 --> 00:55:26.980 Also, we will have the same event in Berlin. 00:55:26.980 --> 00:55:32.280 So, I will be giving a talk on Qt for Python, which is called Mastering Qt for Python in 20 minutes. 00:55:32.780 --> 00:55:38.140 So, if you really want to go to these events, maybe later you can share the link or something. 00:55:38.140 --> 00:55:42.780 I think it is a really nice event to know about Qt for Python and Qt in general. 00:55:42.780 --> 00:55:43.220 All right. 00:55:43.220 --> 00:55:44.300 Yeah, those are great. 00:55:44.300 --> 00:55:46.580 Are you going to be at PyCon 2019? 00:55:46.820 --> 00:55:47.100 No, no. 00:55:47.100 --> 00:55:49.560 No, I didn't have a chance to go there. 00:55:49.560 --> 00:55:57.300 But, yeah, I'm totally planning for next year because since the release was this year, we wanted to go there and try to talk once the product is out, right? 00:55:57.300 --> 00:56:04.440 So, I think we will give it a try next year to maybe go to a couple of Pycons in the U.S. if we can. 00:56:04.440 --> 00:56:06.860 And EuroPython maybe here in Europe. 00:56:06.860 --> 00:56:07.200 Excellent. 00:56:07.340 --> 00:56:08.400 Well, I hope to see you there. 00:56:08.400 --> 00:56:13.580 And definitely your conference's Qt World Summit sounds interesting as well. 00:56:13.580 --> 00:56:14.760 So, thank you so much. 00:56:14.760 --> 00:56:17.320 I really appreciate you being on the show and keep up the good work. 00:56:17.320 --> 00:56:19.300 I can't wait for that build deploy button. 00:56:19.300 --> 00:56:20.160 Thanks to you. 00:56:20.160 --> 00:56:21.460 It was really a pleasure to be here. 00:56:21.460 --> 00:56:23.260 So, yeah, we are looking forward to it. 00:56:23.260 --> 00:56:24.520 Stay tuned. 00:56:24.520 --> 00:56:25.340 Great. 00:56:25.340 --> 00:56:25.880 Talk to you later. 00:56:25.880 --> 00:56:26.560 Thank you very much. 00:56:26.560 --> 00:56:26.780 Bye. 00:56:26.780 --> 00:56:30.720 This has been another episode of Talk Python To Me. 00:56:30.720 --> 00:56:34.720 Our guest on this episode has been Christian Marrera-Fredes. 00:56:34.720 --> 00:56:37.240 And it's been brought to you by Linode and Rollbar. 00:56:37.240 --> 00:56:41.660 Linode is bulletproof hosting for whatever you're building with Python. 00:56:41.660 --> 00:56:46.000 Get four months free at talkpython.fm/linode. 00:56:46.000 --> 00:56:47.800 That's L-I-N-O-D-E. 00:56:47.800 --> 00:56:51.100 Rollbar takes the pain out of errors. 00:56:51.100 --> 00:56:55.540 They give you the context and insight you need to quickly locate and fix errors that might have 00:56:55.540 --> 00:56:57.800 gone unnoticed until your users complained, of course. 00:56:57.800 --> 00:57:05.120 Track a ridiculous number of errors for free as Talk Python To Me listeners at talkpython.fm/rollbar. 00:57:05.120 --> 00:57:07.200 Want to level up your Python? 00:57:07.620 --> 00:57:12.380 If you're just getting started, try my Python jumpstart by building 10 apps or our brand new 00:57:12.380 --> 00:57:14.240 100 days of code in Python. 00:57:14.240 --> 00:57:18.040 And if you're interested in more than one course, be sure to check out the Everything Bundle. 00:57:18.040 --> 00:57:20.280 It's like a subscription that never expires. 00:57:20.280 --> 00:57:22.480 Be sure to subscribe to the show. 00:57:22.480 --> 00:57:24.680 Open your favorite podcatcher and search for Python. 00:57:24.680 --> 00:57:25.920 We should be right at the top. 00:57:25.920 --> 00:57:35.240 You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm. 00:57:35.780 --> 00:57:37.120 This is your host, Michael Kennedy. 00:57:37.120 --> 00:57:38.480 Thanks so much for listening. 00:57:38.480 --> 00:57:39.560 I really appreciate it. 00:57:39.560 --> 00:57:41.500 Now get out there and write some Python code. 00:57:41.500 --> 00:57:43.880 I really appreciate it. 00:57:43.880 --> 00:57:44.780 I really appreciate it. 00:57:44.780 --> 00:57:46.460 I really appreciate it. 00:57:46.460 --> 00:57:46.680 Thank you. 00:57:46.680 --> 00:57:47.040 Thank you. 00:57:47.040 --> 00:57:47.320 Thank you. 00:57:47.320 --> 00:57:48.320 Thank you. 00:57:48.320 --> 00:57:49.320 Thank you. 00:57:49.320 --> 00:57:50.320 Thank you. 00:57:50.320 --> 00:57:51.320 Thank you. 00:57:51.320 --> 00:57:52.320 Thank you. 00:57:52.320 --> 00:57:53.320 Thank you. 00:57:53.320 --> 00:57:54.320 Thank you. 00:57:54.320 --> 00:57:55.320 Thank you. 00:57:55.320 --> 00:57:56.320 Thank you. 00:57:56.320 --> 00:57:57.320 Thank you. 00:57:57.320 --> 00:57:58.320 Thank you. 00:57:58.320 --> 00:57:59.320 Thank you. 00:57:59.320 --> 00:57:59.820 you 00:57:59.820 --> 00:58:00.320 you 00:58:00.320 --> 00:58:02.320 Thank you. 00:58:02.320 --> 00:58:32.300 Thank you.