Latest / Talk Python To Me / #183: Qt for Python
Transcript
- 0:00Python is taking over much of the development world as it quickly is becoming one of the,
- 0:04or simply the most, widely used programming languages.
- 0:07But that does not mean that Python is without its weaknesses.
- 0:11In my mind, there are three such weaknesses.
- 0:14Number one, GUI applications, desktop applications, that kind of thing.
- 0:18Number two, a native general purpose mobile app for iOS and Android framework that we can
- 0:24build that in Python.
- 0:25And number three, deployment.
- 0:27So that is a single binary or set of binary and resource files that I can send either
- 0:32to a mobile device or to a desktop app or to a server.
- 0:35And it just runs regardless of what they have installed on their system.
- 0:39This episode is primarily about number one, the GUI frameworks.
- 0:42One of the best frameworks out there looking to make Python a better language for desktop
- 0:47applications is Qt, namely Qt for Python.
- 0:50This week, you'll meet Christian Mareria Fredes from Qt to tell us all about the revitalization
- 0:55of Qt in the Python space.
- 0:56But you'll also learn they have aspirations to make Qt for Python an option for mobile
- 1:01app development and to solve the deployment problem as well.
- 1:05That hits all three of the weak spots I was telling you about.
- 1:07We could only be rooting for them to solve these problems.
- 1:10This is Talk Python To Me, episode 183, recorded October 10th, 2018.
- 1:15Welcome to Talk Python To Me, a weekly podcast on Python, the language, the libraries, the ecosystem
- 1:34and the personalities.
- 1:35This is your host, Michael Kennedy.
- 1:37Follow me on Twitter where I'm @mkennedy.
- 1:39Keep up with the show and listen to past episodes at talkpython.fm and follow the show on Twitter
- 1:44via at Talk Python.
- 1:45Christian, welcome to Talk Python To Me.
- 1:47Thank you very much.
- 1:48It's great to have you here.
- 1:50I'm very much looking forward to talking about Python GUIs, something I would love to spread
- 1:54the word about, something I would like to see more options for.
- 1:58And it seems like you are doing great work around that.
- 2:00Yeah, totally.
- 2:01I mean, that's why I'm here.
- 2:02I mean, Qt for Python is something kind of new for the Qt project itself.
- 2:07So I'm looking forward to discuss more things about it.
- 2:10Yeah, exactly.
- 2:10It seems like there's a real revitalization around that project, which is awesome.
- 2:14Before we get to that, though, let's start with your story.
- 2:16How did you get into programming in Python?
- 2:17Well, everything started when I started in the university.
- 2:20I had no knowledge of programming whatsoever.
- 2:23I still remember the first class on the blackboard.
- 2:26There was an X equals to X plus one.
- 2:28It made no mathematical sense to me.
- 2:30And yeah, it was mainly in C.
- 2:33But on the second year, there was some weird class talking about Python that you didn't
- 2:38know.
- 2:38And from that day on, I mean, I started to do things by myself.
- 2:42And then here I am.
- 2:43That's really awesome.
- 2:45So you had a formal computer science degree program you went through?
- 2:49Yeah.
- 2:49Yeah.
- 2:49Back in my country, I'm from Chile.
- 2:51There is something called informatics engineer.
- 2:55So there is more like computer science, which I do a bit more of how company works and everything
- 3:00like that.
- 3:00So it's like a six year or something of study.
- 3:02Oh, that sounds like a really cool project or study, course, study.
- 3:06Yeah, totally.
- 3:07Yeah.
- 3:07And so how about today?
- 3:09What are you doing now?
- 3:09Well, we are currently approaching the official release of Qt for Python.
- 3:14So we are really excited about it.
- 3:16But of course, you will understand that there are many things to do.
- 3:19So we are, you know, I mean, today was like a normal day, something, some bucks and trying
- 3:25to bring all the features for the final release that will happen at the end of the year.
- 3:29I'm very excited for that.
- 3:30So you work for the Qt company that makes Qt.
- 3:33Yes.
- 3:33Yeah, exactly.
- 3:34I recently, well, not recently, at the beginning of this year, I am here currently in Berlin.
- 3:40I was doing my PhD here.
- 3:42And then I decided to move it back to industry.
- 3:45So I started to work for the Qt company because I was aware of it.
- 3:49I mean, since like 2009 or something, I had some small projects and I was really curious about it, what they were doing.
- 3:55And there was this opening, I apply and I started to work here in the Qt company.
- 4:01Excellent.
- 4:01So I guess a good place to start is just what is Qt?
- 4:06Because we have things like PySide and PyQt and Qt for Python.
- 4:11But Qt is a UI framework much larger than just Python, right?
- 4:16Right.
- 4:17I 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?
- 4:23So, but with all the other years of experience, I started to notice that it's really more than a cross-platform application framework.
- 4:30And 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.
- 4:43I mean, the modules are really a lot and the things that you can do are really imaginable.
- 4:48So let me see if I have my conception correct.
- 4:52Yeah, I'll bounce this off you.
- 4:54You let me know.
- 4:54So for me, it seems like Qt is a framework for building cross-platform applications.
- 5:01Much of that is GUI, but there's also things like custom threading things and, like you said, other libraries as well.
- 5:10Is that a pretty good summary?
- 5:12Yeah, I don't know.
- 5:13That's a good summary.
- 5:13That's a summary when I start my talks.
- 5:16All right, perfect.
- 5:17Yeah, so I guess I have a pretty good conception of it.
- 5:20And 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.
- 5:31I feel like so many of these cross-platform things just stand out like a sore thumb.
- 5:34One, a lot of them look like they're from, like, you know, 1990.
- 5:38The 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?
- 5:46Exactly.
- 5:46Yeah, my first experience, for example, I remember when I was learning Python, I wanted to do some simple application.
- 5:52I tried to use TK, you know, TK Inter.
- 5:55Yeah.
- 5:56I mean, I admire the work, but, I mean, Inter interface doesn't look really well there.
- 6:02And then I started to move around and everything.
- 6:05And, of course, I'm aware that you know that, for example, one of the biggest projects that uses Qt is KDE.
- 6:09And at least when I started with Linux, it was the most, like, you know, graphical appealing environment for me.
- 6:15So, yeah.
- 6:16Yeah, that's really nice.
- 6:17That's really great.
- 6:18So, let's bring this conversation over to Python now.
- 6:22And maybe we could do a quick tour of what are our options for building Python GUIs at all.
- 6:28I mean, you brought up TK Inter.
- 6:31Well, obviously, we have Qt for Python nowadays.
- 6:34There's other things like wxPython.
- 6:37Do you want to give us a quick tour of what our options are?
- 6:40Well, I mean, you mentioned, like, the main ones, right?
- 6:43I 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.
- 6:50But, of course, not all of them are active now.
- 6:53So, personally, the ones that I am aware of that they are currently developed are, like, TK Inter.
- 6:58I mean, the wxPython.
- 7:00There is also PyQt, another set of bindings for Qt.
- 7:05And also, there is another one called, what's the name, Kiwi, that also, lately, I have heard a lot of Hacker News and Reddit.
- 7:12So, I think it is quite becoming a little bit famous.
- 7:16Yeah, that's good.
- 7:17Yeah, Kiwi's doing good stuff.
- 7:18I feel like it's really focused on more on, like, game experiences.
- 7:24And something like Qt, you could build, you know, a traditional application, right?
- 7:29You could build Visual Studio Code or PyCharm or a web browser or something like that.
- 7:34Yeah, I mean, as you can see, at the beginning, of course, for me, KDE was the biggest and only project.
- 7:41But 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.
- 7:54I'm not even there.
- 7:55I mean, because she's enjoying the company.
- 7:57I 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?
- 8:04And I noticed that, for example, many companies in the automotive industry are using it right now.
- 8:09I mean, of course, since we're in Germany, there's Mercedes.
- 8:13And also lately, Peugeot announced something like that.
- 8:16They were including Qt.
- 8:17But 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.
- 8:27So that was really impressive.
- 8:29Yeah, it was really impressive for me.
- 8:31Yeah, Tesla is definitely one of the more, you know, turned on car companies in terms of technology.
- 8:37So that's pretty awesome.
- 8:38Yeah.
- 8:38And you also have, you said that it's in LG smart TVs.
- 8:42Is that right?
- 8:42Yeah.
- 8:43I mean, also, I mean, there is a couple of these TVs that have some manual.
- 8:46I don't know how to describe it, but it's on the button that you have, like, different elements of the menu and stuff.
- 8:51And that's also written with Qt.
- 8:53And there is also some entertainment system by different electronic companies.
- 8:58And, I mean, this is not just the official clients of Qt, right?
- 9:03I mean, you know, it's an open source project also.
- 9:05So there are many companies out there.
- 9:07And luckily, on the latest conference that I went, for example, I met people of the biggest companies that approached me as,
- 9:14ah, yes, we are using Qt for some internal project and everything.
- 9:17So, of course, we have a lot of open source clients, too.
- 9:20That's really cool.
- 9:21I've talked to some companies even thinking about using it for devices, little embedded devices and stuff.
- 9:26Yeah.
- 9:26That's really a hard topic right now.
- 9:28And, 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.
- 9:35So, and every time that there are conferences, I mean, those are the things that steal the show.
- 9:40I mean, all these embedded systems that we have in comparison with other technologies.
- 9:43But, yeah, sadly, I am not an expert on that field, but maybe next time we can go further.
- 9:49Yeah, that'd be great.
- 9:50Yeah, it feels like Kickstarter should be involved.
- 9:52A little cute, a little Kickstarter.
- 9:54Yeah.
- 9:55And something awesome could be launched.
- 9:57Yeah.
- 9:57Very, very cool.
- 9:59So, the reason I reached out to you guys is we did this overview of the various GUI options.
- 10:06And, you know, those folks who listen to my other podcast, Python Bytes, know that we've gone over so many options.
- 10:12And there are a bunch of them.
- 10:15But 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:21But for a while, there had been this, I don't know, this sort of almost discontent where we had, what, PySide?
- 10:29We had PySide 2.
- 10:30Yeah.
- 10:31You know, PyQt for Qt 4 and then Qt 5.
- 10:36And it was like, well, what is the license model?
- 10:38What one is up to date?
- 10:39What should we do?
- 10:39Can you just sort of let us know, you know, why did you guys work on Qt for Python?
- 10:45And, you know, what is the state of that whole conversation there?
- 10:49Yeah, 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:59I think it was Brazil.
- 10:59And they decided to start a new set of bindings for Qt.
- 11:03And the PySide project was born.
- 11:06And then...
- 11:07Maybe just find that real quick for folks.
- 11:08Like when you say binding, what do you mean?
- 11:10These are like Python libraries that we can use in Python, but they talk to the C API?
- 11:16Exactly.
- 11:16There is some CPython code that will be like connected to C libraries.
- 11:22So that's why we can expose this C++ framework to Python world.
- 11:26So we have some glue in the middle that maybe later we can discuss.
- 11:31But 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:39Because, I mean, there was some Nokia related things going on in the middle.
- 11:43And then there was like no Nokia.
- 11:45And then the project started to evolve.
- 11:48The Qt was Qt 4 back then.
- 11:51And then they said, okay, but now it's Qt 5.
- 11:53So what do we do?
- 11:53And there was some effort by the community to start to port it.
- 11:57And that's why PySide 2 was born.
- 12:00Because now there was support for Qt 5.
- 12:02But the problem is that at the company, we didn't want to focus just in the module.
- 12:08And this is really important for me to say because Qt 4 Python is not just the module.
- 12:12I 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:20Okay.
- 12:20That sounds very interesting.
- 12:22So where does Qt 4 Python fit?
- 12:24Is this just you taking over the PySide 2 project?
- 12:29Is this something different?
- 12:30Yeah.
- 12:30Well, that's the thing.
- 12:31I mean, at the beginning it was associated with Qt, but not officially supported.
- 12:35So 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:44So 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:53Or 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:03That sounds awesome.
- 13:04I'm really excited to hear that you're focusing full effort on this GUI platform for Python.
- 13:11Yeah, totally.
- 13:12Yeah, it's going to be great.
- 13:13And you said the official first release of this Qt for Python update is targeted at the end of the year?
- 13:20Yeah.
- 13:21Well, at the moment, the project was being heavily developed, and we decided to give it a try.
- 13:29So we generated the first set of wheels that we released on PyPy, like in June, I think.
- 13:35But of course, this was under the technical preview label.
- 13:38So of course, use it at your own risk.
- 13:41But 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:56So yeah, we're really looking forward to it.
- 13:58Oh, that's going to be super cool.
- 14:00Now, you're talking about wheels.
- 14:03So that's when I pip install a thing, you know, downloads it and installs it in a nice, simple, Pythonic way.
- 14:09Exactly.
- 14:10I 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:21Right, right.
- 14:22So, go ahead.
- 14:24Yeah, 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:39And I always was struggling with this.
- 14:41But yeah, at the moment, for example, many users ask us like how to deploy applications, how to move these things around.
- 14:48But yeah, we usually encourage people to use PyInstaller.
- 14:52So, 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:02Because 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:12Oh, you guys would take it up a level if you did that.
- 15:15I 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:23Seriously, that, I mean, you already have one of the best cross-platform frameworks.
- 15:27And if you could solve the deployment problem for Python, it would be all.
- 15:31Yeah.
- 15:32Yeah.
- 15:33There are a few options out there.
- 15:34I 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:43And 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:53How can I integrate this with other tools and everything?
- 15:56Yeah, yeah, that's the Fman build system from Michael Herman.
- 15:59That's pretty awesome.
- 16:00Yeah, so that's a pretty promising project.
- 16:03And if you could get some sweet integration where, you know, a lot of, yeah, it seems really, really nice.
- 16:08And he's doing a lot of stuff with Qt.
- 16:10Yeah.
- 16:10So that's cool that you guys are talking.
- 16:12Yeah.
- 16:12I 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.
- 16:23I'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:32It's nice to have it just come already.
- 16:34And if you could get, like, a true binary, then that would solve, I think that would really be something.
- 16:39Yeah, 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:49And then we said, like, I just pip installed PySight 2, and I have everything now from Python.
- 16:53I mean, which kind of magic is this?
- 16:55I mean, they were not even aware of, like, how fast can be.
- 16:57And I think this is one of the main reasons that why the Qt company wanted to officially support Python, right?
- 17:04Because, I mean, this is a podcast about Python, so we don't need to convince people about it.
- 17:09You would be surprised.
- 17:12There'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:18You'd be surprised.
- 17:19So 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:32So convince us, yeah, convince us by Python.
- 17:34I think it's great if you can do it.
- 17:36Yeah.
- 17:36Yeah, well, I mean, every single person that is touching code at some point is aware of Stack Overflow.
- 17:41And, for example, I remember that this year's Stack Overflow Insights were showing how popular Python was becoming.
- 17:48And 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:56And, of course, all the Perl people are the devil, and we will not talk about Perl.
- 18:00But 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:14Yeah.
- 18:15It's amazing.
- 18:15Not even that, not even, like, general users, because, I mean, I have also some background in academia when I was doing my PhD.
- 18:22I encountered that most of the old researchers were using programming languages like Fortran, for example.
- 18:28But all the new ones were using Python.
- 18:30And 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:38I mean, and you cannot, like, expect for some, like, new position data science to ask for, I don't know, C or Fortran.
- 18:45That's really, really, really in the past.
- 18:47I think that's the key.
- 18:49This portion of Talk Python To Me is brought to you by Linode.
- 18:54Are you looking for bulletproof hosting that's fast, simple, and incredibly affordable?
- 18:58Look past that bookstore and check out Linode at talkpython.fm/Linode.
- 19:03That's L-I-N-O-D-E.
- 19:05Plans start at just $5 a month for a dedicated server with a gig of RAM.
- 19:09They have 10 data centers across the globe.
- 19:12So no matter where you are, there's a data center near you.
- 19:14Whether you want to run your Python web app, host a private Git server, or file server,
- 19:19you'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:29Do you need a little help with your infrastructure?
- 19:32They even offer professional services to help you get started with architecture, migrations, and more.
- 19:38Get a dedicated server for free for the next four months.
- 19:41Just visit talkpython.fm/Linode.
- 19:46Yeah.
- 19:46Is the Q company largely a C++ organization, given that a lot of the main product is in C?
- 19:52Yeah.
- 19:53Yeah.
- 19:53Of course, we have some automations and internal tools, but you can find that people knowing about many other programming languages.
- 19:59I 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:11But I mean, it's the majority of the users and the community around is like purely C++ experts.
- 20:17Right, right.
- 20:18I feel like the package management aspect, you know, pip install, anti-gravity, for example, type of things, really is something that Python brings.
- 20:28It's so special compared to, say, C and C++, right?
- 20:32It's just a different level of productivity entirely.
- 20:37Yeah, exactly.
- 20:38And 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:45I mean, how fast something could be to start something.
- 20:49I 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:58And 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:05And 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:12And yeah, that's the main motivation that we currently have as a company.
- 21:15Yeah, that's cool.
- 21:15I agree.
- 21:16I think you missed a step.
- 21:17It's also the figure out why that seg fault is happening.
- 21:20Yeah, well, that's the thing.
- 21:24I 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:32I mean, you know, we're combining two worlds.
- 21:34I mean, we have the same nightmares that sometimes have happened.
- 21:37And on the other side, we have all the CPython structures.
- 21:40So we try to combine these two things.
- 21:42So debugging the development of Kube for Python is challenging, but at the same time, it's a nice source of knowledge.
- 21:50Yeah, so let's dig into how it works a little bit.
- 21:54And I want to follow up on this, you know, how you bridge these two worlds.
- 21:58There's a lot of interesting possibilities there.
- 21:59Yeah.
- 22:01So how do we go from Qt code, Qt headers, and widgets and stuff to generating what is at code level called PySide 2?
- 22:10Okay, so the thing that we do is that the original idea was to extract all this information from the Qt headers.
- 22:18And for this, we use Clang.
- 22:19And also we have some internal tool that's called Shiboken that allows us to modify these headers.
- 22:28Because, I mean, you know, sometimes you have in C++ some void star or, you know, some double star pointers and stuff like that.
- 22:36So we need to manually transform all these things and bring everything to the Python world.
- 22:40Right.
- 22:41Because Python doesn't have a void star star type, right?
- 22:44Exactly.
- 22:45So 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:52Yeah, for sure.
- 22:52Okay, so there's the C++ definition of how to directly natively work with Qt.
- 22:59And then use this thing called Shiboken, which generates modules that interact that are basically for CPython that can then talk to it.
- 23:08So are you using like CFFI or the C API?
- 23:13How does that work?
- 23:14That's the magic.
- 23:15I 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:22But I don't know if you have experience with it.
- 23:24I have not.
- 23:25No, what's BoostPython?
- 23:25BoostPython is just the same idea.
- 23:27And it allows you to generate bindings for Python from some C++ project.
- 23:31But 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:42And this also increased the size of the binaries that you're generating.
- 23:46So the developers back then, they said, okay, what is the best solution right now?
- 23:51Let's write our own binding generator.
- 23:54So it was heavily inspiring BoostPython and trying to remove the template situation.
- 23:59And there is this type system thing that I mentioned.
- 24:01It's just a pure XML file with some directives of modifying signatures, for example, of the methods.
- 24:07And then you can use this to generate the CPython code that you can compile and transform in Python module.
- 24:13Okay.
- 24:13It sounds very interesting.
- 24:15And I recently learned that you can take this, Shavokin, and you can apply it to any C library, potentially.
- 24:22It's not just for Q, right?
- 24:24So this could be a useful tool for people who actually don't care about UIs.
- 24:28Yes, exactly.
- 24:29I 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:36And yeah, it's possible to.
- 24:38I 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:46So, of course, I mean, it's something that is still under development and it's open source.
- 24:50So there is still some incompatibilities.
- 24:52For example, we have some issues with templates, if your project has some templates, and also maybe smart pointers and things like that.
- 25:00But in general, at least for us, it do the work.
- 25:02And 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:10Yeah, it sounds like a really useful tool on its own.
- 25:13Help me understand why or how this might differ from, saying, using something like Cython or something like that.
- 25:21Would another reasonable path be to write part of your code in Cython and directly interact with the C part?
- 25:29Well, Cython is just to, at least I use it just for optimizing some Python code.
- 25:35But 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:42And there are other options like that, I mean, out there that you mentioned, for example, the CFFI.
- 25:47And also there is a nice, what was the name of this module?
- 25:50PyBind 11, that also allows you to, you know, to generate the link between these two worlds.
- 25:57So I think that Shavokin will be one of the nice options out there.
- 26:02But still, I think that we need to, there's a lot of things to be done there.
- 26:05Yeah, yeah, of course.
- 26:06Okay, interesting.
- 26:07Let's talk first at a high level about what some of the modules are.
- 26:11You touched on this a little bit, but what do we get?
- 26:13What do we have to work with when we work with PySide 2?
- 26:17Yeah, 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:24But 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:36So the Qt core, the one that has all the like basic definitions of types and classes that you will use.
- 26:44And then we have some GUI elements that, for example, you can encounter there some like debase of how a widget is created.
- 26:53For example, pixels or, you know, lines and stuff like that.
- 26:56And then you have widgets, which is the more general one that exposes, you know, pre-made things.
- 27:02Like if you have a button, a group box, a checkbox and everything.
- 27:06So usually all the examples code that we currently have, most of them use these three modules for different functionalities.
- 27:13But a normal user, I think I will play around Qt widgets and maybe Qt core for getting a few things.
- 27:18Right.
- 27:19You also have things like Qt charts, Qt multimedia.
- 27:22Yeah.
- 27:22And testing even, right?
- 27:24Yeah, well, that's the thing.
- 27:25I mean, there are many other modules that allow you to do things with Qt that sometimes are exposed in Python natively.
- 27:32For example, we decided to, there is a few mathematical modules that we decided not to expose to Qt for Python directly.
- 27:40Because, of course, you have the math module in Python or you have any other numerical library there.
- 27:47Right.
- 27:47So, but Qt charts, for example, is the one that gets more of our attentions.
- 27:51At 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:57And they can combine it with any other numerical or data sources that they have.
- 28:01That's cool.
- 28:02So 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:12Yeah, yeah, exactly.
- 28:13I mean, that's one of the nice things that we are doing.
- 28:16Of 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:32So nowadays, for example, there is a lot of research being done of like allowing numpy or scipy types into Qt methods and classes.
- 28:43No, that is awesome because it's in C, in numpy, for example, right?
- 28:48Like why does it have to go into Python, then back out into another C layer, right?
- 28:52Like if you could just say, hey, you're all down there, figure that out.
- 28:56Yeah, exactly.
- 28:57That'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:06And pandas and whatnot.
- 29:07Yeah, that's really cool.
- 29:08Yeah, exactly.
- 29:09Yeah.
- 29:09All right.
- 29:10So one of the things that really appeals to me with building GUI applications is a visual designer.
- 29:17I 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:28And then like, I'd like to, you know, I have this method called when I click it.
- 29:31So I wire up a event to, you know, a callback to it.
- 29:34So the Qt project has something like this, right?
- 29:38Yeah, exactly.
- 29:38So there is a, we have our own IDE, which is called Qt Creator.
- 29:43And 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:53But I started to discover the amount of things that you can do inside and it's quite remarkable.
- 29:58I mean, it's my, for example, way to go for debugging applications nowadays.
- 30:01And, 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:10So you start to drag and drop things, move things around, then you generate some kind of scheme, right?
- 30:16So this scheme will be translated into a UI file, which is something, of course, internally of Qt.
- 30:22And then with this UI file, you can do as you want.
- 30:25I mean, you can use it in your C++ project or you can use it for Python, for example.
- 30:30You can load it dynamically or even generating some Python code from this UI file.
- 30:35This portion of Talk Python To Me is brought to you by Rollbar.
- 30:40Got a question for you.
- 30:41Have you been outsourcing your bug discovery to your users?
- 30:44Have you been making them send you bug reports?
- 30:47You know, there's two problems with that.
- 30:48You can't discover all the bugs this way.
- 30:50And some users don't bother reporting bugs at all.
- 30:53They just leave, sometimes forever.
- 30:55The best software teams practice proactive error monitoring.
- 30:59They detect all the errors in their production apps and services in real time and debug important errors in minutes or hours,
- 31:05sometimes before users even notice.
- 31:07Teams from companies like Twilio, Instacart, and CircleCI use Rollbar to do this.
- 31:12With Rollbar, you get a real-time feed of all the errors so you know exactly what's broken in production.
- 31:18And 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:25If you aren't using Rollbar yet, they have a special offer for you and it's really awesome.
- 31:30Sign up and install Rollbar at talkpython.fm/Rollbar.
- 31:34And Rollbar will send you a $100 gift card to use at the Open Collective,
- 31:38where you can donate to any of the 900 plus projects listed under the Open Source Collective or to the Women Who Code organization.
- 31:46Get notified of errors in real time and make a difference in Open Source.
- 31:50Visit talkpython.fm/Rollbar today.
- 31:54When you start talking about editors, that's a very sensitive thing for me as well, right?
- 32:01Yeah.
- 32:01It sounds to me like I can take the Qt Creator, which is what that IDE you're talking about is called, right?
- 32:07I 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:15Well, I mean, yes, but again, that's another spoiler alert.
- 32:18No, but I mean, we are working on a proper integration with Qt Creator.
- 32:23At the moment, I mean, you can use it to code your applications and everything and everything is there.
- 32:28Syntax highlight.
- 32:29And now we have even some testing phase for auto-completion.
- 32:33But the problem is that we don't want to just provide a nice editor and that's it.
- 32:38I mean, we want to integrate more options and a more like a better integration with the Qt project.
- 32:43So just the thing that you mentioned about deployment or maybe transfer or creating base projects in Python.
- 32:49So everything of this is in our like to-do list of like what is the future of the project.
- 32:55So that's why we are so looking forward to releasing as soon as possible to start to work on these features.
- 33:00And 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:13And this is something that is really new because in the past it was just C++.
- 33:16But now, since we have PySide 2, you are allowed or you will be allowed to modify the IDE even with Python.
- 33:23So we are Pythonizing everything.
- 33:24That is cool.
- 33:25So basically, I could write like extensions or plugins or whatever you call it for Qt Creator in Python.
- 33:30Exactly.
- 33:31Exactly.
- 33:31That's the idea.
- 33:32That's cool.
- 33:34So 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:42Do 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:55Or does that not really happen?
- 33:57Yeah.
- 33:57Yeah.
- 33:57To 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:04Most 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:20So we have, for example, the same idea of writing plugins for your application is being done by any other project.
- 34:28One of our clients, for example, which is the graphical effects industry, it's called Autodesk.
- 34:33They also allow users to extend the application itself, writing the plugins with PySide.
- 34:41And also, like I have heard some stories of people also with some big C++ projects trying to allow users to write Python stuff.
- 34:48So, yeah, this is totally possible.
- 34:51Okay.
- 34:51How interesting.
- 34:52So I guess some other areas you might try to work on is we talked about embedded systems a little bit.
- 35:00What about mobile?
- 35:01Yeah.
- 35:01Well, mobile is something that every time that we go to some conference or talk, there is the question about what about mobile support?
- 35:09People pull up their phone and they're like, here.
- 35:12Exactly.
- 35:12I want it here.
- 35:13Billions of people are here.
- 35:15How do I do this?
- 35:16Are you working on this?
- 35:17Yeah.
- 35:17Well, this is something that at least would be like also another thing in our to-do list.
- 35:23But we are focusing on the previous topic before.
- 35:26But, yeah, it's something that we need to do.
- 35:28We need to achieve.
- 35:29I mean, at the moment, you have the option to go around with iOS or Android with Qt.
- 35:34There are some options, even in Qt Creator to deploy C++ applications to it.
- 35:39But, yeah, it's something that is really pending on us.
- 35:42But it's something that we totally would like to do.
- 35:44Because 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:53I 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:04So, yeah, we are totally going to be a part of that movement, too.
- 36:08I would love for you guys to be part of that if you're bringing Python along for the party.
- 36:11That'd be cool.
- 36:12It'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:26Yeah, I mean, if you have some experience with Java, I mean, you will understand the pain.
- 36:30I mean, sadly, I have some experience, too.
- 36:33But, I mean, it was really frustrating even to writing small pieces of code.
- 36:37And 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:47I mean, we cannot deny it.
- 36:48I mean, it really has a lot of Python on it.
- 36:51And even the way of writing some stuff is like, hmm, this sounds like Python.
- 36:54So, yeah, I'm pretty sure that they tried and they had Python in mind when trying to write it.
- 36:59Yeah, interesting.
- 37:00I really haven't done very much with Kotlin.
- 37:02So, maybe I should check it out.
- 37:03Yeah, it's quite nice.
- 37:04It sounds interesting.
- 37:05Yeah, there was an article.
- 37:06I can't remember where it was.
- 37:08It was on some major unexpected, you know, magazine or news source that was talking about the future of programming languages.
- 37:15And it says, you know, one of the predictions was that Python is going to be the great-grandfather of many, many programming languages.
- 37:22I think that's probably true.
- 37:24And this sounds a little bit like that.
- 37:25You have Swift as well.
- 37:26Yeah, yeah, yeah.
- 37:27Right, exactly.
- 37:28Well, 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:36Because it's bringing something that is simplicity, right?
- 37:39I mean, you know, I mean, the first time that I encountered Python, it was so easy to do things.
- 37:43I 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:51Yeah.
- 37:52You know, it was simple.
- 37:53That's the way that people started moving for, yeah.
- 37:55It'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.
- 38:06All these parentheses around the if statement are required.
- 38:09And then you come work on Python, and, you know, it's a bit of a shock to the system, for sure.
- 38:15You're like, wait a minute, spacing matters?
- 38:16There's no curly braces?
- 38:18Where's it?
- 38:19But then, you know, after just a week, if you go back to the other language, you're like, what is all this stuff?
- 38:24Like, you're right.
- 38:24These parentheses here are not necessary.
- 38:27Why do I have to type all this stuff?
- 38:29Yes.
- 38:29And I remember back in the university, even teaching C, it was really a nightmare.
- 38:35Because, I mean, we all write code and even write normal, like, with handwriting and stuff differently.
- 38:40But having this space requirements, it's something that is so enlightened for writing code.
- 38:45And, I mean, it's really difficult to write ugly Python code.
- 38:49But I have seen, like, I mean, maybe you're aware of even, like, these obfuscated code tournaments that you have.
- 38:55Yes, that's so interesting.
- 38:57Yeah, tell people about that.
- 38:58Because I remember just being blown away from it.
- 39:02Well, the whole idea of obfuscated code is that to write code that can, when you see the code, it resembles something.
- 39:08And usually are really cryptic things and moving bytes around and stuff.
- 39:12And, 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:19And then when you compile the circle and you execute it, you get the value of P.
- 39:24And I was like, what?
- 39:25That is beautiful.
- 39:26It's really weird.
- 39:28I mean, with Python, I mean, luckily we will not have this kind of obfuscated tournaments or something.
- 39:34Because that would be a nice thing.
- 39:35Yeah, it definitely goes against the Xen of Python for sure.
- 39:38Totally.
- 39:39Really cool.
- 39:39So, 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:55You know, lowercase first variable and then uppercase second as the first letter, then uppercase second, like, compacted word or composite word.
- 40:03Yeah.
- 40:03As opposed to snake, you know, in the snake case with the underscores and all lowercase.
- 40:07So, what's the story with this semi-non-Pythonic Python API?
- 40:12This is really a hot topic.
- 40:14Every 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:22Because 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:42Because if we start to replace all the camel cases for underscore, which is the Python way of doing it, we will break everything.
- 40:49And people will start to run examples, for example, from C++, and will be unable to decipher how to write these things in Python.
- 40:56So, we said, okay, we need to settle somewhere.
- 40:58So, everything, every time that we use the Qt API, we'll use camel case.
- 41:02But everything else will be following all the peps that we want and the Python styling.
- 41:09So, that's why the examples look a little bit mixed.
- 41:11But, yeah, I mean, I think it is the best balance for the two worlds.
- 41:16And we are not the ones, the only ones.
- 41:18I think that there is asyncio or I don't know.
- 41:21There is another module in Python that uses camel case for the API.
- 41:23I'm not sure about it.
- 41:24But, I mean, I think that is a nice solution.
- 41:26Yeah, I have seen it before.
- 41:28I can't remember where it was either.
- 41:30But I'm like, wait, why is this library, you know, got this style?
- 41:32And I think it was in the standard library.
- 41:34That's funny.
- 41:36Ian, that makes sense to me.
- 41:37It's a bit of a trade-off, right?
- 41:38Like, you've already got this code that exists.
- 41:42And if you're going to generate it, there's this sort of easiest to generate exactly the same names.
- 41:47If you don't have to necessarily do the documentation as differently.
- 41:51Yeah.
- 41:51And even for us, for translating examples, for example, we have like, we graph any function written in C++.
- 41:58Then we copy it to the Python.
- 42:00We remove the brackets.
- 42:01We check the consistency.
- 42:02We remove all the semicolons.
- 42:04And that's it.
- 42:04I mean, there you have it.
- 42:05Look at all the complicated stuff.
- 42:07You take it away.
- 42:07All the unnecessary symbolic stuff that's hanging around.
- 42:12And look.
- 42:12It's the Python version.
- 42:14Interesting.
- 42:15Yeah.
- 42:16I've seen other frameworks like where they have something.
- 42:20Ultimately, it's a C API underneath.
- 42:22And it supports different languages.
- 42:24And they've taught basically the equivalent of their Shibokin to say,
- 42:28if I'm generating Python, it looks like this.
- 42:30If I'm generating JavaScript, JavaScript has this coding convention.
- 42:34But I can see the argument also for just saying,
- 42:36most of the people who are coming to this world are coming from the C++ world.
- 42:40And their code looks like this.
- 42:41Let's not shock them too much.
- 42:43Yeah, exactly.
- 42:44Totally.
- 42:44Yeah.
- 42:45But you have this debate often, huh?
- 42:46Yeah.
- 42:47I know.
- 42:47It's something that is, even when we are writing the code base of the projects,
- 42:51we have people that are really into Python, people that really comes from C++.
- 42:56So when we are doing all the code reviews, we start to clash, you know, between like,
- 43:02ah, you need to live in a space.
- 43:03No, it's not CPython standard.
- 43:04No, that's C++ standard.
- 43:06So we need to even agree with you among us.
- 43:09So yeah.
- 43:09Yeah.
- 43:10Interesting.
- 43:11So one thing that I saw showing up in the documentation and the API and stuff was this
- 43:17thing called signals and slots.
- 43:19Yeah.
- 43:20What's this and how does this look in Python?
- 43:22So yeah.
- 43:22I mean, signals and slots are the base of queued.
- 43:25So the idea behind this is that we treat every single element of the interface and also underneath
- 43:32as an object, as a queue object.
- 43:34So these objects can interact between them.
- 43:38And the idea of signals and slots is like that.
- 43:41I mean, an object will have something that will trigger something else.
- 43:44So let's put it like simple.
- 43:46If you have a button, then a button is also a queue object.
- 43:50And this button will have a special signal that it will call, for example, clicked.
- 43:54Of course, because you can click the button.
- 43:56And then this click signal will trigger something else.
- 43:59So then you can have another function or method, or what you want to call it, that will be the
- 44:05slot of it.
- 44:06So every time that you click the button, you will do something.
- 44:08So it's a really basic principle.
- 44:10But I mean, this is the base of the whole Qt framework.
- 44:14So that will be roughly the same in Qt for Python.
- 44:18And we follow the same idea.
- 44:20We are not adding new signals or removing old ones.
- 44:22I mean, it's just keeping the same API.
- 44:24So that's really nice of it.
- 44:26Yeah, okay.
- 44:27So this is a way to basically wire up functions to be called for user interface events.
- 44:33Mouse over, click, whatever.
- 44:35Exactly.
- 44:35The hover, trigger, everything, like check, everything.
- 44:38So what's the performance look like if I've got a non-trivial C++ application written in Qt,
- 44:46and then I were to rewrite that in Qt for Python, what would my experience be like?
- 44:54For general applications, like even big ones, like for example, a browser.
- 45:00Personally, I haven't performed any like a real test, you know, which are milliseconds, etc.
- 45:06But I kind of noticed any like lag or delays on having something written in Python.
- 45:12And the only problem with time that will come will see something only if you are writing Python code that is slow.
- 45:20So 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:27maybe you will of course encounter some bad speedup for your application.
- 45:32But 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:40and we couldn't notice like any difference of like executing the C++ and the Python versions,
- 45:45because they're quite simple.
- 45:46And there's again fast, because after all, I mean, we are just calling the C++ methods and functions underneath.
- 45:53That's a really interesting bit there.
- 45:55I 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:01But much of the time, if you're doing say like data science stuff, or in the case of Qt,
- 46:06you're doing a little bit of Python orchestration around objects that are executing in C directly, right?
- 46:13So like in your web browser example, you might say like if somebody types in the address bar and hits enter,
- 46:18you want it to drive the web browser widget to go to that address.
- 46:23But 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:32And so it's only if you're actually doing like lots of computation directly in Python, right?
- 46:38Yeah, I think most of these statements come from people that really are not really experienced on Python in the sense of like,
- 46:44they try to rewrite Java or C++ code in the same way.
- 46:48So you are aware of it that, of course, that if you write, for example, iterations on Python list or list comprehension,
- 46:54or maybe you have some ways of optimizing your code, you can even reach like the same levels.
- 46:59And I think that this will just depend on the amount of knowledge that the user can have, right?
- 47:04Because 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:11So we need to rethink the algorithms to use Python in a better way.
- 47:15Yeah, for sure.
- 47:15And I brought up the import anti-gravity.
- 47:17You know, so much of what I think would happen if you're coming from one of these other libraries
- 47:23that doesn't have as many foundational things to use is you just copy the code over
- 47:28and then you try to execute it on CPython.
- 47:31But 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:38And that completely changes the story.
- 47:40So it's pretty interesting.
- 47:41So you think it's a pretty reasonable thing to do to write acute application, GUI applications in Python.
- 47:47It's not going to be a complete night and day thing?
- 47:49Yeah, totally.
- 47:50I mean, at least that's my personal opinion.
- 47:52I'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:00And they have some speed issues.
- 48:02But I think that we are open to it.
- 48:05We had a case recently of there was a bug.
- 48:08There was some person that was populating a table.
- 48:11I think like 100 times on the table was like a huge.
- 48:16And of course, I mean, the user brought the bug on it.
- 48:20But I mean, we didn't understand what was the real use of this.
- 48:22But we were quite open about it.
- 48:25And 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:34So we were quite open about it.
- 48:36And every time that someone brings some speed issues to the IRC channel, we try to figure it out and try to solve it.
- 48:41Seems like you're doing a good job.
- 48:42It sounds great.
- 48:43All right.
- 48:44Are you ready for a tough question?
- 48:45Yes, I am.
- 48:46All right.
- 48:46So you said that this is available for open source projects for free or there's a license that I can buy.
- 48:54So for open source license, for open source, it's under what?
- 48:58GPL?
- 48:59LGPL?
- 49:00LGPL.
- 49:01LGPL.
- 49:02So if I write, like, let's suppose I write a database management application, right?
- 49:07I want to have a new designer and graphical designer for, like, working with databases.
- 49:11I'm going to write that in Qt for Python.
- 49:13That would mean my application would have to be open source.
- 49:16Well, I mean, that's just following the LDPL.
- 49:19Right.
- 49:20So, yeah.
- 49:20But if I don't want that, what do I do?
- 49:23If I want to sell that product, for example.
- 49:24That's the thing.
- 49:25I mean, since, of course, Qt is based on this open source idea, but we're also a company.
- 49:31We need to have some customers with some, you know, support and everything.
- 49:35We sell license for commercial use.
- 49:38So this will allow you to build whatever you want in Qt and sell it as your own product and everything.
- 49:45So 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:59So that's one of the nice things.
- 50:01And, of course, and always, we will keep all the code open source and LGPL related.
- 50:06So, yeah.
- 50:07Right.
- 50:07Okay.
- 50:07What does that cost me?
- 50:09I really don't know the prices at the moment, but I can point you to any salesperson.
- 50:17Yeah, yeah.
- 50:17No, but it really depends, I think, the size of the amount of licenses that you want to buy.
- 50:23Do you know how it's apportioned?
- 50:25Like, is it the number of customers I have?
- 50:27Is it the number of developers working on the project?
- 50:30I really don't know about it.
- 50:31I think that it's based on the developers, but I don't know that well either.
- 50:36Okay.
- 50:37But there is a, if I want to build commercial applications, there's a path for that.
- 50:41And if I want to build open source applications, there's a path for that.
- 50:43Exactly.
- 50:44Okay.
- 50:45Well, that sounds good.
- 50:46I 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:54Where's this going?
- 50:56So, 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:03Then what?
- 51:04So, yeah.
- 51:05I 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:12Because we have a lot of ideas.
- 51:14And, but we don't have enough time as usual.
- 51:18So, yeah.
- 51:18So, yeah.
- 51:18I mean, our number one, I think, task is the Qt creator integration.
- 51:24So, 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:33I mean, the designer and then build your UI files into Python files and everything.
- 51:38So, I think that's one of the high priority.
- 51:40And this comes, of course, at the hands of all the deployment aspects that we want to cover.
- 51:45After that, it really will be depending on the users that we have.
- 51:50I mean, we are really, really open about it.
- 51:52And every time on IRC, sometimes we ask, what do you think that would be better for the next step?
- 51:58Personally, I mean, I would like to go into, after the Qt creator and deployment, maybe for embedded system.
- 52:04Because 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:12So, please, what do I need to do?
- 52:13So, there are a lot of people doing this.
- 52:15And 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:23Because 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:30It'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:38I 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:49Similarly, 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:59So, I'm excited to hear this, and I wish you good luck on the journey, because we all need it.
- 53:05Yeah, thank you.
- 53:06Yeah, pretty cool.
- 53:07All right, well, I think we've pretty much covered the topic.
- 53:11I know there's a lot more we could go into, but it's a good introduction for people.
- 53:15So, Q for Python, I'm super excited that you all are working on it.
- 53:18Let me ask you the two questions before you get out of here.
- 53:21If you're going to write some Python code, what editor do you use?
- 53:24Vim, forever.
- 53:25I cannot get out of it.
- 53:26No, no.
- 53:28Yeah, have you tried?
- 53:29I 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:38But if you, I mean, I am really used to Vim, so I cannot get out of it in all sense.
- 53:44So, please, if you know, help me.
- 53:46No, but it's my ecosystem.
- 53:48So, I think that's the only thing that I require to do everything.
- 53:52Yeah, cool.
- 53:53And 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:02Yeah, well, of course, PySci2.
- 54:03Of course.
- 54:04No, but during my studies, I think that all this, the SciPy suite is something that is, it was a must.
- 54:12I mean, I couldn't do anything without NumPy, MatplotLeave, all these things.
- 54:16So, I am really trying to follow in all the developments of data science, for example, or the Jupyter notebooks.
- 54:22I think that those are amazing for the Python community.
- 54:25And 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:34Yeah, black is cool.
- 54:35Because it had a couple of files, and it was really, really nice.
- 54:37So, yeah.
- 54:38Cool.
- 54:38Those are definitely good ones.
- 54:39All right, Christian.
- 54:41People are excited about Qt for Python.
- 54:43Final call to action.
- 54:44What do they do?
- 54:44So, okay.
- 54:45So, 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:52We are quite active on IRC.
- 54:54I personally promise you that I will be there at least in working hours or something.
- 54:58But I try to answer all the questions.
- 55:01We have a lot of users since we started the first wheel set.
- 55:05So, if you have any questions, just go on IRC, and we will be there.
- 55:08And 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:16A lot of people go there, all the clients, all the new users, everything.
- 55:20And we have two dates.
- 55:21One is in Boston, the 29th and 30th of October.
- 55:25Also, we will have the same event in Berlin.
- 55:26So, I will be giving a talk on Qt for Python, which is called Mastering Qt for Python in 20 minutes.
- 55:32So, if you really want to go to these events, maybe later you can share the link or something.
- 55:38I think it is a really nice event to know about Qt for Python and Qt in general.
- 55:42All right.
- 55:43Yeah, those are great.
- 55:44Are you going to be at PyCon 2019?
- 55:46No, no.
- 55:47No, I didn't have a chance to go there.
- 55:49But, 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:57So, 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:04And EuroPython maybe here in Europe.
- 56:06Excellent.
- 56:07Well, I hope to see you there.
- 56:08And definitely your conference's Qt World Summit sounds interesting as well.
- 56:13So, thank you so much.
- 56:14I really appreciate you being on the show and keep up the good work.
- 56:17I can't wait for that build deploy button.
- 56:19Thanks to you.
- 56:20It was really a pleasure to be here.
- 56:21So, yeah, we are looking forward to it.
- 56:23Stay tuned.
- 56:24Great.
- 56:25Talk to you later.
- 56:25Thank you very much.
- 56:26Bye.
- 56:26This has been another episode of Talk Python To Me.
- 56:30Our guest on this episode has been Christian Marrera-Fredes.
- 56:34And it's been brought to you by Linode and Rollbar.
- 56:37Linode is bulletproof hosting for whatever you're building with Python.
- 56:41Get four months free at talkpython.fm/linode.
- 56:46That's L-I-N-O-D-E.
- 56:47Rollbar takes the pain out of errors.
- 56:51They give you the context and insight you need to quickly locate and fix errors that might have
- 56:55gone unnoticed until your users complained, of course.
- 56:57Track a ridiculous number of errors for free as Talk Python To Me listeners at talkpython.fm/rollbar.
- 57:05Want to level up your Python?
- 57:07If you're just getting started, try my Python jumpstart by building 10 apps or our brand new
- 57:12100 days of code in Python.
- 57:14And if you're interested in more than one course, be sure to check out the Everything Bundle.
- 57:18It's like a subscription that never expires.
- 57:20Be sure to subscribe to the show.
- 57:22Open your favorite podcatcher and search for Python.
- 57:24We should be right at the top.
- 57:25You can also find the iTunes feed at /itunes, Google Play feed at /play, and direct RSS feed at /rss on talkpython.fm.
- 57:35This is your host, Michael Kennedy.
- 57:37Thanks so much for listening.
- 57:38I really appreciate it.
- 57:39Now get out there and write some Python code.
- 57:41I really appreciate it.
- 57:43I really appreciate it.
- 57:44I really appreciate it.
- 57:46Thank you.
- 57:46Thank you.
- 57:47Thank you.
- 57:47Thank you.
- 57:48Thank you.
- 57:49Thank you.
- 57:50Thank you.
- 57:51Thank you.
- 57:52Thank you.
- 57:53Thank you.
- 57:54Thank you.
- 57:55Thank you.
- 57:56Thank you.
- 57:57Thank you.
- 57:58Thank you.
- 57:59you
- 57:59you
- 58:00Thank you.
- 58:02Thank you.