Learn Python with Talk Python's 270 hours of courses

#183: Qt for Python Transcript

Recorded on Tuesday, Oct 2, 2018.

00:00 Python is taking over much of the development world as it quickly is becoming one of the,

00:04 or simply the most, widely used programming languages.

00:07 But that does not mean that Python is without its weaknesses.

00:11 In my mind, there are three such weaknesses.

00:14 Number one, GUI applications, desktop applications, that kind of thing.

00:18 Number two, a native general purpose mobile app for iOS and Android framework that we can

00:24 build that in Python.

00:25 And number three, deployment.

00:27 So that is a single binary or set of binary and resource files that I can send either

00:32 to a mobile device or to a desktop app or to a server.

00:35 And it just runs regardless of what they have installed on their system.

00:39 This episode is primarily about number one, the GUI frameworks.

00:42 One of the best frameworks out there looking to make Python a better language for desktop

00:47 applications is Qt, namely Qt for Python.

00:50 This week, you'll meet Christian Mareria Fredes from Qt to tell us all about the revitalization

00:55 of Qt in the Python space.

00:56 But you'll also learn they have aspirations to make Qt for Python an option for mobile

01:01 app development and to solve the deployment problem as well.

01:05 That hits all three of the weak spots I was telling you about.

01:07 We could only be rooting for them to solve these problems.

01:10 This is Talk Python to Me, episode 183, recorded October 10th, 2018.

01:15 Welcome to Talk Python to Me, a weekly podcast on Python, the language, the libraries, the ecosystem

01:34 and the personalities.

01:35 This is your host, Michael Kennedy.

01:37 Follow me on Twitter where I'm @mkennedy.

01:39 Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter

01:44 via at Talk Python.

01:45 Christian, welcome to Talk Python to Me.

01:47 Thank you very much.

01:48 It's great to have you here.

01:50 I'm very much looking forward to talking about Python GUIs, something I would love to spread

01:54 the word about, something I would like to see more options for.

01:58 And it seems like you are doing great work around that.

02:00 Yeah, totally.

02:01 I mean, that's why I'm here.

02:02 I mean, Qt for Python is something kind of new for the Qt project itself.

02:07 So I'm looking forward to discuss more things about it.

02:10 Yeah, exactly.

02:10 It seems like there's a real revitalization around that project, which is awesome.

02:14 Before we get to that, though, let's start with your story.

02:16 How did you get into programming in Python?

02:17 Well, everything started when I started in the university.

02:20 I had no knowledge of programming whatsoever.

02:23 I still remember the first class on the blackboard.

02:26 There was an X equals to X plus one.

02:28 It made no mathematical sense to me.

02:30 And yeah, it was mainly in C.

02:33 But on the second year, there was some weird class talking about Python that you didn't

02:38 know.

02:38 And from that day on, I mean, I started to do things by myself.

02:42 And then here I am.

02:43 That's really awesome.

02:45 So you had a formal computer science degree program you went through?

02:49 Yeah.

02:49 Yeah.

02:49 Back in my country, I'm from Chile.

02:51 There is something called informatics engineer.

02:55 So there is more like computer science, which I do a bit more of how company works and everything

03:00 like that.

03:00 So it's like a six year or something of study.

03:02 Oh, that sounds like a really cool project or study, course, study.

03:06 Yeah, totally.

03:07 Yeah.

03:07 And so how about today?

03:09 What are you doing now?

03:09 Well, we are currently approaching the official release of Qt for Python.

03:14 So we are really excited about it.

03:16 But of course, you will understand that there are many things to do.

03:19 So we are, you know, I mean, today was like a normal day, something, some bucks and trying

03:25 to bring all the features for the final release that will happen at the end of the year.

03:29 I'm very excited for that.

03:30 So you work for the Qt company that makes Qt.

03:33 Yes.

03:33 Yeah, exactly.

03:34 I recently, well, not recently, at the beginning of this year, I am here currently in Berlin.

03:40 I was doing my PhD here.

03:42 And then I decided to move it back to industry.

03:45 So I started to work for the Qt company because I was aware of it.

03:49 I mean, since like 2009 or something, I had some small projects and I was really curious about it, what they were doing.

03:55 And there was this opening, I apply and I started to work here in the Qt company.

04:01 Excellent.

04:01 So I guess a good place to start is just what is Qt?

04:06 Because we have things like PySide and PyQt and Qt for Python.

04:11 But Qt is a UI framework much larger than just Python, right?

04:16 Right.

04:17 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?

04:23 So, but with all the other years of experience, I started to notice that it's really more than a cross-platform application framework.

04:30 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.

04:43 I mean, the modules are really a lot and the things that you can do are really imaginable.

04:48 So let me see if I have my conception correct.

04:52 Yeah, I'll bounce this off you.

04:54 You let me know.

04:54 So for me, it seems like Qt is a framework for building cross-platform applications.

05:01 Much of that is GUI, but there's also things like custom threading things and, like you said, other libraries as well.

05:10 Is that a pretty good summary?

05:12 Yeah, I don't know.

05:13 That's a good summary.

05:13 That's a summary when I start my talks.

05:16 All right, perfect.

05:17 Yeah, so I guess I have a pretty good conception of it.

05:20 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.

05:31 I feel like so many of these cross-platform things just stand out like a sore thumb.

05:34 One, a lot of them look like they're from, like, you know, 1990.

05:38 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?

05:46 Exactly.

05:46 Yeah, my first experience, for example, I remember when I was learning Python, I wanted to do some simple application.

05:52 I tried to use TK, you know, TK Inter.

05:55 Yeah.

05:56 I mean, I admire the work, but, I mean, Inter interface doesn't look really well there.

06:02 And then I started to move around and everything.

06:05 And, of course, I'm aware that you know that, for example, one of the biggest projects that uses Qt is KDE.

06:09 And at least when I started with Linux, it was the most, like, you know, graphical appealing environment for me.

06:15 So, yeah.

06:16 Yeah, that's really nice.

06:17 That's really great.

06:18 So, let's bring this conversation over to Python now.

06:22 And maybe we could do a quick tour of what are our options for building Python GUIs at all.

06:28 I mean, you brought up TK Inter.

06:31 Well, obviously, we have Qt for Python nowadays.

06:34 There's other things like WX Python.

06:37 Do you want to give us a quick tour of what our options are?

06:40 Well, I mean, you mentioned, like, the main ones, right?

06:43 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.

06:50 But, of course, not all of them are active now.

06:53 So, personally, the ones that I am aware of that they are currently developed are, like, TK Inter.

06:58 I mean, the WX Python.

07:00 There is also PyQt, another set of bindings for Qt.

07:05 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.

07:12 So, I think it is quite becoming a little bit famous.

07:16 Yeah, that's good.

07:17 Yeah, Kiwi's doing good stuff.

07:18 I feel like it's really focused on more on, like, game experiences.

07:24 And something like Qt, you could build, you know, a traditional application, right?

07:29 You could build Visual Studio Code or PyCharm or a web browser or something like that.

07:34 Yeah, I mean, as you can see, at the beginning, of course, for me, KDE was the biggest and only project.

07:41 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.

07:54 I'm not even there.

07:55 I mean, because she's enjoying the company.

07:57 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?

08:04 And I noticed that, for example, many companies in the automotive industry are using it right now.

08:09 I mean, of course, since we're in Germany, there's Mercedes.

08:13 And also lately, Peugeot announced something like that.

08:16 They were including Qt.

08:17 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.

08:27 So that was really impressive.

08:29 Yeah, it was really impressive for me.

08:31 Yeah, Tesla is definitely one of the more, you know, turned on car companies in terms of technology.

08:37 So that's pretty awesome.

08:38 Yeah.

08:38 And you also have, you said that it's in LG smart TVs.

08:42 Is that right?

08:42 Yeah.

08:43 I mean, also, I mean, there is a couple of these TVs that have some manual.

08:46 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.

08:51 And that's also written with Qt.

08:53 And there is also some entertainment system by different electronic companies.

08:58 And, I mean, this is not just the official clients of Qt, right?

09:03 I mean, you know, it's an open source project also.

09:05 So there are many companies out there.

09:07 And luckily, on the latest conference that I went, for example, I met people of the biggest companies that approached me as,

09:14 ah, yes, we are using Qt for some internal project and everything.

09:17 So, of course, we have a lot of open source clients, too.

09:20 That's really cool.

09:21 I've talked to some companies even thinking about using it for devices, little embedded devices and stuff.

09:26 Yeah.

09:26 That's really a hard topic right now.

09:28 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.

09:35 So, and every time that there are conferences, I mean, those are the things that steal the show.

09:40 I mean, all these embedded systems that we have in comparison with other technologies.

09:43 But, yeah, sadly, I am not an expert on that field, but maybe next time we can go further.

09:49 Yeah, that'd be great.

09:50 Yeah, it feels like Kickstarter should be involved.

09:52 A little cute, a little Kickstarter.

09:54 Yeah.

09:55 And something awesome could be launched.

09:57 Yeah.

09:57 Very, very cool.

09:59 So, the reason I reached out to you guys is we did this overview of the various GUI options.

10:06 And, you know, those folks who listen to my other podcast, Python Bytes, know that we've gone over so many options.

10:12 And there are a bunch of them.

10:15 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.

10:21 But for a while, there had been this, I don't know, this sort of almost discontent where we had, what, PySide?

10:29 We had PySide 2.

10:30 Yeah.

10:31 You know, PyQt for Qt 4 and then Qt 5.

10:36 And it was like, well, what is the license model?

10:38 What one is up to date?

10:39 What should we do?

10:39 Can you just sort of let us know, you know, why did you guys work on Qt for Python?

10:45 And, you know, what is the state of that whole conversation there?

10:49 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.

10:59 I think it was Brazil.

10:59 And they decided to start a new set of bindings for Qt.

11:03 And the PySide project was born.

11:06 And then...

11:07 Maybe just find that real quick for folks.

11:08 Like when you say binding, what do you mean?

11:10 These are like Python libraries that we can use in Python, but they talk to the C API?

11:16 Exactly.

11:16 There is some CPython code that will be like connected to C libraries.

11:22 So that's why we can expose this C++ framework to Python world.

11:26 So we have some glue in the middle that maybe later we can discuss.

11:31 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.

11:39 Because, I mean, there was some Nokia related things going on in the middle.

11:43 And then there was like no Nokia.

11:45 And then the project started to evolve.

11:48 The Qt was Qt 4 back then.

11:51 And then they said, okay, but now it's Qt 5.

11:53 So what do we do?

11:53 And there was some effort by the community to start to port it.

11:57 And that's why PySide 2 was born.

12:00 Because now there was support for Qt 5.

12:02 But the problem is that at the company, we didn't want to focus just in the module.

12:08 And this is really important for me to say because Qt 4 Python is not just the module.

12:12 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.

12:20 Okay.

12:20 That sounds very interesting.

12:22 So where does Qt 4 Python fit?

12:24 Is this just you taking over the PySide 2 project?

12:29 Is this something different?

12:30 Yeah.

12:30 Well, that's the thing.

12:31 I mean, at the beginning it was associated with Qt, but not officially supported.

12:35 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.

12:44 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.

12:53 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.

13:03 That sounds awesome.

13:04 I'm really excited to hear that you're focusing full effort on this GUI platform for Python.

13:11 Yeah, totally.

13:12 Yeah, it's going to be great.

13:13 And you said the official first release of this Qt for Python update is targeted at the end of the year?

13:20 Yeah.

13:21 Well, at the moment, the project was being heavily developed, and we decided to give it a try.

13:29 So we generated the first set of wheels that we released on PyPy, like in June, I think.

13:35 But of course, this was under the technical preview label.

13:38 So of course, use it at your own risk.

13:41 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.

13:56 So yeah, we're really looking forward to it.

13:58 Oh, that's going to be super cool.

14:00 Now, you're talking about wheels.

14:03 So that's when I pip install a thing, you know, downloads it and installs it in a nice, simple, Pythonic way.

14:09 Exactly.

14:10 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?

14:21 Right, right.

14:22 So, go ahead.

14:24 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.

14:39 And I always was struggling with this.

14:41 But yeah, at the moment, for example, many users ask us like how to deploy applications, how to move these things around.

14:48 But yeah, we usually encourage people to use PyInstaller.

14:52 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.

15:02 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.

15:12 Oh, you guys would take it up a level if you did that.

15:15 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.

15:23 Seriously, that, I mean, you already have one of the best cross-platform frameworks.

15:27 And if you could solve the deployment problem for Python, it would be all.

15:31 Yeah.

15:32 Yeah.

15:33 There are a few options out there.

15:34 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.

15:43 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?

15:53 How can I integrate this with other tools and everything?

15:56 Yeah, yeah, that's the Fman build system from Michael Herman.

15:59 That's pretty awesome.

16:00 Yeah, so that's a pretty promising project.

16:03 And if you could get some sweet integration where, you know, a lot of, yeah, it seems really, really nice.

16:08 And he's doing a lot of stuff with Qt.

16:10 Yeah.

16:10 So that's cool that you guys are talking.

16:12 Yeah.

16:12 I think it's already, though, it's already better that you can pip install dash r requirements.txt or, you know, pip inf your world, and you just get the Qt runtime.

16:23 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?

16:32 It's nice to have it just come already.

16:34 And if you could get, like, a true binary, then that would solve, I think that would really be something.

16:39 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.

16:49 And then we said, like, I just pip installed PySight 2, and I have everything now from Python.

16:53 I mean, which kind of magic is this?

16:55 I mean, they were not even aware of, like, how fast can be.

16:57 And I think this is one of the main reasons that why the Qt company wanted to officially support Python, right?

17:04 Because, I mean, this is a podcast about Python, so we don't need to convince people about it.

17:09 You would be surprised.

17:12 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.

17:18 You'd be surprised.

17:19 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?

17:32 So convince us, yeah, convince us by Python.

17:34 I think it's great if you can do it.

17:36 Yeah.

17:36 Yeah, well, I mean, every single person that is touching code at some point is aware of Stack Overflow.

17:41 And, for example, I remember that this year's Stack Overflow Insights were showing how popular Python was becoming.

17:48 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.

17:56 And, of course, all the Perl people are the devil, and we will not talk about Perl.

18:00 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.

18:14 Yeah.

18:15 It's amazing.

18:15 Not even that, not even, like, general users, because, I mean, I have also some background in academia when I was doing my PhD.

18:22 I encountered that most of the old researchers were using programming languages like Fortran, for example.

18:28 But all the new ones were using Python.

18:30 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.

18:38 I mean, and you cannot, like, expect for some, like, new position data science to ask for, I don't know, C or Fortran.

18:45 That's really, really, really in the past.

18:47 I think that's the key.

18:49 This portion of Talk Python to me is brought to you by Linode.

18:54 Are you looking for bulletproof hosting that's fast, simple, and incredibly affordable?

18:58 Look past that bookstore and check out Linode at talkpython.fm/Linode.

19:03 That's L-I-N-O-D-E.

19:05 Plans start at just $5 a month for a dedicated server with a gig of RAM.

19:09 They have 10 data centers across the globe.

19:12 So no matter where you are, there's a data center near you.

19:14 Whether you want to run your Python web app, host a private Git server, or file server,

19:19 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.

19:29 Do you need a little help with your infrastructure?

19:32 They even offer professional services to help you get started with architecture, migrations, and more.

19:38 Get a dedicated server for free for the next four months.

19:41 Just visit talkpython.fm/Linode.

19:46 Yeah.

19:46 Is the Q company largely a C++ organization, given that a lot of the main product is in C?

19:52 Yeah.

19:53 Yeah.

19:53 Of course, we have some automations and internal tools, but you can find that people knowing about many other programming languages.

19:59 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.

20:11 But I mean, it's the majority of the users and the community around is like purely C++ experts.

20:17 Right, right.

20:18 I feel like the package management aspect, you know, pip install, anti-gravity, for example, type of things, really is something that Python brings.

20:28 It's so special compared to, say, C and C++, right?

20:32 It's just a different level of productivity entirely.

20:37 Yeah, exactly.

20:38 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.

20:45 I mean, how fast something could be to start something.

20:49 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.

20:58 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.

21:05 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.

21:12 And yeah, that's the main motivation that we currently have as a company.

21:15 Yeah, that's cool.

21:15 I agree.

21:16 I think you missed a step.

21:17 It's also the figure out why that seg fault is happening.

21:20 Yeah, well, that's the thing.

21:24 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.

21:32 I mean, you know, we're combining two worlds.

21:34 I mean, we have the same nightmares that sometimes have happened.

21:37 And on the other side, we have all the CPython structures.

21:40 So we try to combine these two things.

21:42 So debugging the development of Kube for Python is challenging, but at the same time, it's a nice source of knowledge.

21:50 Yeah, so let's dig into how it works a little bit.

21:54 And I want to follow up on this, you know, how you bridge these two worlds.

21:58 There's a lot of interesting possibilities there.

21:59 Yeah.

22:01 So how do we go from Qt code, Qt headers, and widgets and stuff to generating what is at code level called PySide 2?

22:10 Okay, so the thing that we do is that the original idea was to extract all this information from the Qt headers.

22:18 And for this, we use Clang.

22:19 And also we have some internal tool that's called Shiboken that allows us to modify these headers.

22:28 Because, I mean, you know, sometimes you have in C++ some void star or, you know, some double star pointers and stuff like that.

22:36 So we need to manually transform all these things and bring everything to the Python world.

22:40 Right.

22:41 Because Python doesn't have a void star star type, right?

22:44 Exactly.

22:45 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.

22:52 Yeah, for sure.

22:52 Okay, so there's the C++ definition of how to directly natively work with Qt.

22:59 And then use this thing called Shiboken, which generates modules that interact that are basically for CPython that can then talk to it.

23:08 So are you using like CFFI or the C API?

23:13 How does that work?

23:14 That's the magic.

23:15 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.

23:22 But I don't know if you have experience with it.

23:24 I have not.

23:25 No, what's BoostPython?

23:25 BoostPython is just the same idea.

23:27 And it allows you to generate bindings for Python from some C++ project.

23:31 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.

23:42 And this also increased the size of the binaries that you're generating.

23:46 So the developers back then, they said, okay, what is the best solution right now?

23:51 Let's write our own binding generator.

23:54 So it was heavily inspiring BoostPython and trying to remove the template situation.

23:59 And there is this type system thing that I mentioned.

24:01 It's just a pure XML file with some directives of modifying signatures, for example, of the methods.

24:07 And then you can use this to generate the CPython code that you can compile and transform in Python module.

24:13 Okay.

24:13 It sounds very interesting.

24:15 And I recently learned that you can take this, Shavokin, and you can apply it to any C library, potentially.

24:22 It's not just for Q, right?

24:24 So this could be a useful tool for people who actually don't care about UIs.

24:28 Yes, exactly.

24:29 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.

24:36 And yeah, it's possible to.

24:38 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.

24:46 So, of course, I mean, it's something that is still under development and it's open source.

24:50 So there is still some incompatibilities.

24:52 For example, we have some issues with templates, if your project has some templates, and also maybe smart pointers and things like that.

25:00 But in general, at least for us, it do the work.

25:02 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.

25:10 Yeah, it sounds like a really useful tool on its own.

25:13 Help me understand why or how this might differ from, saying, using something like Cython or something like that.

25:21 Would another reasonable path be to write part of your code in Cython and directly interact with the C part?

25:29 Well, Cython is just to, at least I use it just for optimizing some Python code.

25:35 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.

25:42 And there are other options like that, I mean, out there that you mentioned, for example, the CFFI.

25:47 And also there is a nice, what was the name of this module?

25:50 PyBind 11, that also allows you to, you know, to generate the link between these two worlds.

25:57 So I think that Shavokin will be one of the nice options out there.

26:02 But still, I think that we need to, there's a lot of things to be done there.

26:05 Yeah, yeah, of course.

26:06 Okay, interesting.

26:07 Let's talk first at a high level about what some of the modules are.

26:11 You touched on this a little bit, but what do we get?

26:13 What do we have to work with when we work with PySide 2?

26:17 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.

26:24 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.

26:36 So the Qt core, the one that has all the like basic definitions of types and classes that you will use.

26:44 And then we have some GUI elements that, for example, you can encounter there some like debase of how a widget is created.

26:53 For example, pixels or, you know, lines and stuff like that.

26:56 And then you have widgets, which is the more general one that exposes, you know, pre-made things.

27:02 Like if you have a button, a group box, a checkbox and everything.

27:06 So usually all the examples code that we currently have, most of them use these three modules for different functionalities.

27:13 But a normal user, I think I will play around Qt widgets and maybe Qt core for getting a few things.

27:18 Right.

27:19 You also have things like Qt charts, Qt multimedia.

27:22 Yeah.

27:22 And testing even, right?

27:24 Yeah, well, that's the thing.

27:25 I mean, there are many other modules that allow you to do things with Qt that sometimes are exposed in Python natively.

27:32 For example, we decided to, there is a few mathematical modules that we decided not to expose to Qt for Python directly.

27:40 Because, of course, you have the math module in Python or you have any other numerical library there.

27:47 Right.

27:47 So, but Qt charts, for example, is the one that gets more of our attentions.

27:51 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.

27:57 And they can combine it with any other numerical or data sources that they have.

28:01 That's cool.

28:02 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.

28:12 Yeah, yeah, exactly.

28:13 I mean, that's one of the nice things that we are doing.

28:16 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.

28:32 So nowadays, for example, there is a lot of research being done of like allowing numpy or scipy types into Qt methods and classes.

28:43 No, that is awesome because it's in C, in numpy, for example, right?

28:48 Like why does it have to go into Python, then back out into another C layer, right?

28:52 Like if you could just say, hey, you're all down there, figure that out.

28:56 Yeah, exactly.

28:57 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.

29:06 And pandas and whatnot.

29:07 Yeah, that's really cool.

29:08 Yeah, exactly.

29:09 Yeah.

29:09 All right.

29:10 So one of the things that really appeals to me with building GUI applications is a visual designer.

29:17 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.

29:28 And then like, I'd like to, you know, I have this method called when I click it.

29:31 So I wire up a event to, you know, a callback to it.

29:34 So the Qt project has something like this, right?

29:38 Yeah, exactly.

29:38 So there is a, we have our own IDE, which is called Qt Creator.

29:43 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.

29:53 But I started to discover the amount of things that you can do inside and it's quite remarkable.

29:58 I mean, it's my, for example, way to go for debugging applications nowadays.

30:01 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.

30:10 So you start to drag and drop things, move things around, then you generate some kind of scheme, right?

30:16 So this scheme will be translated into a UI file, which is something, of course, internally of Qt.

30:22 And then with this UI file, you can do as you want.

30:25 I mean, you can use it in your C++ project or you can use it for Python, for example.

30:30 You can load it dynamically or even generating some Python code from this UI file.

30:35 This portion of Talk Python to Me is brought to you by Rollbar.

30:40 Got a question for you.

30:41 Have you been outsourcing your bug discovery to your users?

30:44 Have you been making them send you bug reports?

30:47 You know, there's two problems with that.

30:48 You can't discover all the bugs this way.

30:50 And some users don't bother reporting bugs at all.

30:53 They just leave, sometimes forever.

30:55 The best software teams practice proactive error monitoring.

30:59 They detect all the errors in their production apps and services in real time and debug important errors in minutes or hours,

31:05 sometimes before users even notice.

31:07 Teams from companies like Twilio, Instacart, and CircleCI use Rollbar to do this.

31:12 With Rollbar, you get a real-time feed of all the errors so you know exactly what's broken in production.

31:18 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.

31:25 If you aren't using Rollbar yet, they have a special offer for you and it's really awesome.

31:30 Sign up and install Rollbar at talkpython.fm/Rollbar.

31:34 And Rollbar will send you a $100 gift card to use at the Open Collective,

31:38 where you can donate to any of the 900 plus projects listed under the Open Source Collective or to the Women Who Code organization.

31:46 Get notified of errors in real time and make a difference in Open Source.

31:50 Visit talkpython.fm/Rollbar today.

31:54 When you start talking about editors, that's a very sensitive thing for me as well, right?

32:01 Yeah.

32:01 It sounds to me like I can take the Qt Creator, which is what that IDE you're talking about is called, right?

32:07 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.

32:15 Well, I mean, yes, but again, that's another spoiler alert.

32:18 No, but I mean, we are working on a proper integration with Qt Creator.

32:23 At the moment, I mean, you can use it to code your applications and everything and everything is there.

32:28 Syntax highlight.

32:29 And now we have even some testing phase for auto-completion.

32:33 But the problem is that we don't want to just provide a nice editor and that's it.

32:38 I mean, we want to integrate more options and a more like a better integration with the Qt project.

32:43 So just the thing that you mentioned about deployment or maybe transfer or creating base projects in Python.

32:49 So everything of this is in our like to-do list of like what is the future of the project.

32:55 So that's why we are so looking forward to releasing as soon as possible to start to work on these features.

33:00 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.

33:13 And this is something that is really new because in the past it was just C++.

33:16 But now, since we have PySide 2, you are allowed or you will be allowed to modify the IDE even with Python.

33:23 So we are Pythonizing everything.

33:24 That is cool.

33:25 So basically, I could write like extensions or plugins or whatever you call it for Qt Creator in Python.

33:30 Exactly.

33:31 Exactly.

33:31 That's the idea.

33:32 That's cool.

33:34 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.

33:42 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?

33:55 Or does that not really happen?

33:57 Yeah.

33:57 Yeah.

33:57 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.

34:04 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.

34:20 So we have, for example, the same idea of writing plugins for your application is being done by any other project.

34:28 One of our clients, for example, which is the graphical effects industry, it's called Autodesk.

34:33 They also allow users to extend the application itself, writing the plugins with PySide.

34:41 And also, like I have heard some stories of people also with some big C++ projects trying to allow users to write Python stuff.

34:48 So, yeah, this is totally possible.

34:51 Okay.

34:51 How interesting.

34:52 So I guess some other areas you might try to work on is we talked about embedded systems a little bit.

35:00 What about mobile?

35:01 Yeah.

35:01 Well, mobile is something that every time that we go to some conference or talk, there is the question about what about mobile support?

35:09 People pull up their phone and they're like, here.

35:12 Exactly.

35:12 I want it here.

35:13 Billions of people are here.

35:15 How do I do this?

35:16 Are you working on this?

35:17 Yeah.

35:17 Well, this is something that at least would be like also another thing in our to-do list.

35:23 But we are focusing on the previous topic before.

35:26 But, yeah, it's something that we need to do.

35:28 We need to achieve.

35:29 I mean, at the moment, you have the option to go around with iOS or Android with Qt.

35:34 There are some options, even in Qt Creator to deploy C++ applications to it.

35:39 But, yeah, it's something that is really pending on us.

35:42 But it's something that we totally would like to do.

35:44 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.

35:53 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.

36:04 So, yeah, we are totally going to be a part of that movement, too.

36:08 I would love for you guys to be part of that if you're bringing Python along for the party.

36:11 That'd be cool.

36:12 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.

36:26 Yeah, I mean, if you have some experience with Java, I mean, you will understand the pain.

36:30 I mean, sadly, I have some experience, too.

36:33 But, I mean, it was really frustrating even to writing small pieces of code.

36:37 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.

36:47 I mean, we cannot deny it.

36:48 I mean, it really has a lot of Python on it.

36:51 And even the way of writing some stuff is like, hmm, this sounds like Python.

36:54 So, yeah, I'm pretty sure that they tried and they had Python in mind when trying to write it.

36:59 Yeah, interesting.

37:00 I really haven't done very much with Kotlin.

37:02 So, maybe I should check it out.

37:03 Yeah, it's quite nice.

37:04 It sounds interesting.

37:05 Yeah, there was an article.

37:06 I can't remember where it was.

37:08 It was on some major unexpected, you know, magazine or news source that was talking about the future of programming languages.

37:15 And it says, you know, one of the predictions was that Python is going to be the great-grandfather of many, many programming languages.

37:22 I think that's probably true.

37:24 And this sounds a little bit like that.

37:25 You have Swift as well.

37:26 Yeah, yeah, yeah.

37:27 Right, exactly.

37:28 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.

37:36 Because it's bringing something that is simplicity, right?

37:39 I mean, you know, I mean, the first time that I encountered Python, it was so easy to do things.

37:43 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?

37:51 Yeah.

37:52 You know, it was simple.

37:53 That's the way that people started moving for, yeah.

37:55 It's so interesting that when you come from one of these C-based languages or something like C++, C Sharp, Java, whatever, even JavaScript, you feel like, oh, all these curly braces are required.

38:06 All these parentheses around the if statement are required.

38:09 And then you come work on Python, and, you know, it's a bit of a shock to the system, for sure.

38:15 You're like, wait a minute, spacing matters?

38:16 There's no curly braces?

38:18 Where's it?

38:19 But then, you know, after just a week, if you go back to the other language, you're like, what is all this stuff?

38:24 Like, you're right.

38:24 These parentheses here are not necessary.

38:27 Why do I have to type all this stuff?

38:29 Yes.

38:29 And I remember back in the university, even teaching C, it was really a nightmare.

38:35 Because, I mean, we all write code and even write normal, like, with handwriting and stuff differently.

38:40 But having this space requirements, it's something that is so enlightened for writing code.

38:45 And, I mean, it's really difficult to write ugly Python code.

38:49 But I have seen, like, I mean, maybe you're aware of even, like, these obfuscated code tournaments that you have.

38:55 Yes, that's so interesting.

38:57 Yeah, tell people about that.

38:58 Because I remember just being blown away from it.

39:02 Well, the whole idea of obfuscated code is that to write code that can, when you see the code, it resembles something.

39:08 And usually are really cryptic things and moving bytes around and stuff.

39:12 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.

39:19 And then when you compile the circle and you execute it, you get the value of P.

39:24 And I was like, what?

39:25 That is beautiful.

39:26 It's really weird.

39:28 I mean, with Python, I mean, luckily we will not have this kind of obfuscated tournaments or something.

39:34 Because that would be a nice thing.

39:35 Yeah, it definitely goes against the Xen of Python for sure.

39:38 Totally.

39:39 Really cool.

39:39 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.

39:55 You know, lowercase first variable and then uppercase second as the first letter, then uppercase second, like, compacted word or composite word.

40:03 Yeah.

40:03 As opposed to snake, you know, in the snake case with the underscores and all lowercase.

40:07 So, what's the story with this semi-non-Pythonic Python API?

40:12 This is really a hot topic.

40:14 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.

40:22 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.

40:42 Because if we start to replace all the camel cases for underscore, which is the Python way of doing it, we will break everything.

40:49 And people will start to run examples, for example, from C++, and will be unable to decipher how to write these things in Python.

40:56 So, we said, okay, we need to settle somewhere.

40:58 So, everything, every time that we use the Qt API, we'll use camel case.

41:02 But everything else will be following all the peps that we want and the Python styling.

41:09 So, that's why the examples look a little bit mixed.

41:11 But, yeah, I mean, I think it is the best balance for the two worlds.

41:16 And we are not the ones, the only ones.

41:18 I think that there is asyncio or I don't know.

41:21 There is another module in Python that uses camel case for the API.

41:23 I'm not sure about it.

41:24 But, I mean, I think that is a nice solution.

41:26 Yeah, I have seen it before.

41:28 I can't remember where it was either.

41:30 But I'm like, wait, why is this library, you know, got this style?

41:32 And I think it was in the standard library.

41:34 That's funny.

41:36 Ian, that makes sense to me.

41:37 It's a bit of a trade-off, right?

41:38 Like, you've already got this code that exists.

41:42 And if you're going to generate it, there's this sort of easiest to generate exactly the same names.

41:47 If you don't have to necessarily do the documentation as differently.

41:51 Yeah.

41:51 And even for us, for translating examples, for example, we have like, we graph any function written in C++.

41:58 Then we copy it to the Python.

42:00 We remove the brackets.

42:01 We check the consistency.

42:02 We remove all the semicolons.

42:04 And that's it.

42:04 I mean, there you have it.

42:05 Look at all the complicated stuff.

42:07 You take it away.

42:07 All the unnecessary symbolic stuff that's hanging around.

42:12 And look.

42:12 It's the Python version.

42:14 Interesting.

42:15 Yeah.

42:16 I've seen other frameworks like where they have something.

42:20 Ultimately, it's a C API underneath.

42:22 And it supports different languages.

42:24 And they've taught basically the equivalent of their Shibokin to say, if I'm generating Python, it looks like this.

42:30 If I'm generating JavaScript, JavaScript has this coding convention.

42:34 But I can see the argument also for just saying, most of the people who are coming to this world are coming from the C++ world.

42:40 And their code looks like this.

42:41 Let's not shock them too much.

42:43 Yeah, exactly.

42:44 Totally.

42:44 Yeah.

42:45 But you have this debate often, huh?

42:46 Yeah.

42:47 I know.

42:47 It's something that is, even when we are writing the code base of the projects,

42:51 we have people that are really into Python, people that really comes from C++.

42:56 So when we are doing all the code reviews, we start to clash, you know, between like,

43:02 ah, you need to live in a space.

43:03 No, it's not CPython standard.

43:04 No, that's C++ standard.

43:06 So we need to even agree with you among us.

43:09 So yeah.

43:09 Yeah.

43:10 Interesting.

43:11 So one thing that I saw showing up in the documentation and the API and stuff was this

43:17 thing called signals and slots.

43:19 Yeah.

43:20 What's this and how does this look in Python?

43:22 So yeah.

43:22 I mean, signals and slots are the base of queued.

43:25 So the idea behind this is that we treat every single element of the interface and also underneath

43:32 as an object, as a queue object.

43:34 So these objects can interact between them.

43:38 And the idea of signals and slots is like that.

43:41 I mean, an object will have something that will trigger something else.

43:44 So let's put it like simple.

43:46 If you have a button, then a button is also a queue object.

43:50 And this button will have a special signal that it will call, for example, clicked.

43:54 Of course, because you can click the button.

43:56 And then this click signal will trigger something else.

43:59 So then you can have another function or method, or what you want to call it, that will be the

44:05 slot of it.

44:06 So every time that you click the button, you will do something.

44:08 So it's a really basic principle.

44:10 But I mean, this is the base of the whole Qt framework.

44:14 So that will be roughly the same in Qt for Python.

44:18 And we follow the same idea.

44:20 We are not adding new signals or removing old ones.

44:22 I mean, it's just keeping the same API.

44:24 So that's really nice of it.

44:26 Yeah, okay.

44:27 So this is a way to basically wire up functions to be called for user interface events.

44:33 Mouse over, click, whatever.

44:35 Exactly.

44:35 The hover, trigger, everything, like check, everything.

44:38 So what's the performance look like if I've got a non-trivial C++ application written in Qt,

44:46 and then I were to rewrite that in Qt for Python, what would my experience be like?

44:54 For general applications, like even big ones, like for example, a browser.

45:00 Personally, I haven't performed any like a real test, you know, which are milliseconds, etc.

45:06 But I kind of noticed any like lag or delays on having something written in Python.

45:12 And the only problem with time that will come will see something only if you are writing Python code that is slow.

45:20 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,

45:27 maybe you will of course encounter some bad speedup for your application.

45:32 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,

45:40 and we couldn't notice like any difference of like executing the C++ and the Python versions,

45:45 because they're quite simple.

45:46 And there's again fast, because after all, I mean, we are just calling the C++ methods and functions underneath.

45:53 That's a really interesting bit there.

45:55 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.

46:01 But much of the time, if you're doing say like data science stuff, or in the case of Qt,

46:06 you're doing a little bit of Python orchestration around objects that are executing in C directly, right?

46:13 So like in your web browser example, you might say like if somebody types in the address bar and hits enter,

46:18 you want it to drive the web browser widget to go to that address.

46:23 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?

46:32 And so it's only if you're actually doing like lots of computation directly in Python, right?

46:38 Yeah, I think most of these statements come from people that really are not really experienced on Python in the sense of like,

46:44 they try to rewrite Java or C++ code in the same way.

46:48 So you are aware of it that, of course, that if you write, for example, iterations on Python list or list comprehension,

46:54 or maybe you have some ways of optimizing your code, you can even reach like the same levels.

46:59 And I think that this will just depend on the amount of knowledge that the user can have, right?

47:04 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.

47:11 So we need to rethink the algorithms to use Python in a better way.

47:15 Yeah, for sure.

47:15 And I brought up the import anti-gravity.

47:17 You know, so much of what I think would happen if you're coming from one of these other libraries

47:23 that doesn't have as many foundational things to use is you just copy the code over

47:28 and then you try to execute it on CPython.

47:31 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?

47:38 And that completely changes the story.

47:40 So it's pretty interesting.

47:41 So you think it's a pretty reasonable thing to do to write acute application, GUI applications in Python.

47:47 It's not going to be a complete night and day thing?

47:49 Yeah, totally.

47:50 I mean, at least that's my personal opinion.

47:52 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.

48:00 And they have some speed issues.

48:02 But I think that we are open to it.

48:05 We had a case recently of there was a bug.

48:08 There was some person that was populating a table.

48:11 I think like 100 times on the table was like a huge.

48:16 And of course, I mean, the user brought the bug on it.

48:20 But I mean, we didn't understand what was the real use of this.

48:22 But we were quite open about it.

48:25 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.

48:34 So we were quite open about it.

48:36 And every time that someone brings some speed issues to the IRC channel, we try to figure it out and try to solve it.

48:41 Seems like you're doing a good job.

48:42 It sounds great.

48:43 All right.

48:44 Are you ready for a tough question?

48:45 Yes, I am.

48:46 All right.

48:46 So you said that this is available for open source projects for free or there's a license that I can buy.

48:54 So for open source license, for open source, it's under what?

48:58 GPL?

48:59 LGPL?

49:00 LGPL.

49:01 LGPL.

49:02 So if I write, like, let's suppose I write a database management application, right?

49:07 I want to have a new designer and graphical designer for, like, working with databases.

49:11 I'm going to write that in Qt for Python.

49:13 That would mean my application would have to be open source.

49:16 Well, I mean, that's just following the LDPL.

49:19 Right.

49:20 So, yeah.

49:20 But if I don't want that, what do I do?

49:23 If I want to sell that product, for example.

49:24 That's the thing.

49:25 I mean, since, of course, Qt is based on this open source idea, but we're also a company.

49:31 We need to have some customers with some, you know, support and everything.

49:35 We sell license for commercial use.

49:38 So this will allow you to build whatever you want in Qt and sell it as your own product and everything.

49:45 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.

49:59 So that's one of the nice things.

50:01 And, of course, and always, we will keep all the code open source and LGPL related.

50:06 So, yeah.

50:07 Right.

50:07 Okay.

50:07 What does that cost me?

50:09 I really don't know the prices at the moment, but I can point you to any salesperson.

50:17 Yeah, yeah.

50:17 No, but it really depends, I think, the size of the amount of licenses that you want to buy.

50:23 Do you know how it's apportioned?

50:25 Like, is it the number of customers I have?

50:27 Is it the number of developers working on the project?

50:30 I really don't know about it.

50:31 I think that it's based on the developers, but I don't know that well either.

50:36 Okay.

50:37 But there is a, if I want to build commercial applications, there's a path for that.

50:41 And if I want to build open source applications, there's a path for that.

50:43 Exactly.

50:44 Okay.

50:45 Well, that sounds good.

50:46 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.

50:54 Where's this going?

50:56 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.

51:03 Then what?

51:04 So, yeah.

51:05 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.

51:12 Because we have a lot of ideas.

51:14 And, but we don't have enough time as usual.

51:18 So, yeah.

51:18 So, yeah.

51:18 I mean, our number one, I think, task is the Qt creator integration.

51:24 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?

51:33 I mean, the designer and then build your UI files into Python files and everything.

51:38 So, I think that's one of the high priority.

51:40 And this comes, of course, at the hands of all the deployment aspects that we want to cover.

51:45 After that, it really will be depending on the users that we have.

51:50 I mean, we are really, really open about it.

51:52 And every time on IRC, sometimes we ask, what do you think that would be better for the next step?

51:58 Personally, I mean, I would like to go into, after the Qt creator and deployment, maybe for embedded system.

52:04 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.

52:12 So, please, what do I need to do?

52:13 So, there are a lot of people doing this.

52:15 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.

52:23 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.

52:30 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.

52:38 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.

52:49 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.

52:59 So, I'm excited to hear this, and I wish you good luck on the journey, because we all need it.

53:05 Yeah, thank you.

53:06 Yeah, pretty cool.

53:07 All right, well, I think we've pretty much covered the topic.

53:11 I know there's a lot more we could go into, but it's a good introduction for people.

53:15 So, Q for Python, I'm super excited that you all are working on it.

53:18 Let me ask you the two questions before you get out of here.

53:21 If you're going to write some Python code, what editor do you use?

53:24 Vim, forever.

53:25 I cannot get out of it.

53:26 No, no.

53:28 Yeah, have you tried?

53:29 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.

53:38 But if you, I mean, I am really used to Vim, so I cannot get out of it in all sense.

53:44 So, please, if you know, help me.

53:46 No, but it's my ecosystem.

53:48 So, I think that's the only thing that I require to do everything.

53:52 Yeah, cool.

53:53 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.

54:02 Yeah, well, of course, PySci2.

54:03 Of course.

54:04 No, but during my studies, I think that all this, the SciPy suite is something that is, it was a must.

54:12 I mean, I couldn't do anything without NumPy, MatplotLeave, all these things.

54:16 So, I am really trying to follow in all the developments of data science, for example, or the Jupyter notebooks.

54:22 I think that those are amazing for the Python community.

54:25 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.

54:34 Yeah, black is cool.

54:35 Because it had a couple of files, and it was really, really nice.

54:37 So, yeah.

54:38 Cool.

54:38 Those are definitely good ones.

54:39 All right, Christian.

54:41 People are excited about Qt for Python.

54:43 Final call to action.

54:44 What do they do?

54:44 So, okay.

54:45 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.

54:52 We are quite active on IRC.

54:54 I personally promise you that I will be there at least in working hours or something.

54:58 But I try to answer all the questions.

55:01 We have a lot of users since we started the first wheel set.

55:05 So, if you have any questions, just go on IRC, and we will be there.

55:08 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.

55:16 A lot of people go there, all the clients, all the new users, everything.

55:20 And we have two dates.

55:21 One is in Boston, the 29th and 30th of October.

55:25 Also, we will have the same event in Berlin.

55:26 So, I will be giving a talk on Qt for Python, which is called Mastering Qt for Python in 20 minutes.

55:32 So, if you really want to go to these events, maybe later you can share the link or something.

55:38 I think it is a really nice event to know about Qt for Python and Qt in general.

55:42 All right.

55:43 Yeah, those are great.

55:44 Are you going to be at PyCon 2019?

55:46 No, no.

55:47 No, I didn't have a chance to go there.

55:49 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?

55:57 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.

56:04 And EuroPython maybe here in Europe.

56:06 Excellent.

56:07 Well, I hope to see you there.

56:08 And definitely your conference's Qt World Summit sounds interesting as well.

56:13 So, thank you so much.

56:14 I really appreciate you being on the show and keep up the good work.

56:17 I can't wait for that build deploy button.

56:19 Thanks to you.

56:20 It was really a pleasure to be here.

56:21 So, yeah, we are looking forward to it.

56:23 Stay tuned.

56:24 Great.

56:25 Talk to you later.

56:25 Thank you very much.

56:26 Bye.

56:26 This has been another episode of Talk Python to Me.

56:30 Our guest on this episode has been Christian Marrera-Fredes.

56:34 And it's been brought to you by Linode and Rollbar.

56:37 Linode is bulletproof hosting for whatever you're building with Python.

56:41 Get four months free at talkpython.fm/linode.

56:46 That's L-I-N-O-D-E.

56:47 Rollbar takes the pain out of errors.

56:51 They give you the context and insight you need to quickly locate and fix errors that might have

56:55 gone unnoticed until your users complained, of course.

56:57 Track a ridiculous number of errors for free as Talk Python to Me listeners at talkpython.fm/rollbar.

57:05 Want to level up your Python?

57:07 If you're just getting started, try my Python jumpstart by building 10 apps or our brand new

57:12 100 days of code in Python.

57:14 And if you're interested in more than one course, be sure to check out the Everything Bundle.

57:18 It's like a subscription that never expires.

57:20 Be sure to subscribe to the show.

57:22 Open your favorite podcatcher and search for Python.

57:24 We should be right at the top.

57:25 You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm.

57:35 This is your host, Michael Kennedy.

57:37 Thanks so much for listening.

57:38 I really appreciate it.

57:39 Now get out there and write some Python code.

57:41 I really appreciate it.

57:43 I really appreciate it.

57:44 I really appreciate it.

57:46 Thank you.

57:46 Thank you.

57:47 Thank you.

57:47 Thank you.

57:48 Thank you.

57:49 Thank you.

57:50 Thank you.

57:51 Thank you.

57:52 Thank you.

57:53 Thank you.

57:54 Thank you.

57:55 Thank you.

57:56 Thank you.

57:57 Thank you.

57:58 Thank you.

57:59 you you Thank you.

58:02 Thank you.

Back to show page
Talk Python's Mastodon Michael Kennedy's Mastodon