 Well, today I would like to talk about a GUI package called PySympo GUI. Let me just show my interest, why I'm interested in PySympo GUI. I had some experience with animation, quite technical in Tika Inter, because I have a kind of simulation package. But then I also had some project that could use an attractive GUI. And my first idea was then Tika Inter, but it's quite tricky. And then I had practically no experience with those GUIs. And then I got into contact with the sole developer and maintainer of this PySympo GUI package through a forum I joined regularly. And I thought, well, this is a good start. But you have to remember I'm not really a GUI expert. I just wanted to show you what I found. And I would do some live coding, just building one or two small projects. So what's on the menu for today? Just a short introduction with GUIs, what is PySympo GUI. I want to do, if possible, two sample applications, show you a little bit of what PySympo can do with the work from others. Some pros and cons and then a conclusion. So why GUIs? Well, they're important because, well, if you just have a text interface, it doesn't really work. It's complicated. And just even for simple tasks can be already very interesting to have a pretty interface. But GUIs are usually quite complicated. They take time to set up. And so you have to know a lot of things. And that's why it's sometimes not very attractive to start with that. So for instance, a very small GUI, more or less trivial thing. We have the input function. So we just ask for a number. And another number that just ended up and then we have a certain time. Well, this is not very attractive, of course. There's absolutely nothing there. Another example of a non-GUI application is a command line interface. For instance, black, the formator. If you want to run that one from the command line, you have a number of options. And you have to remember all the formats and all that. So it's also not very attractive. It would be nice to have a kind of interface for that. And we're going to work on that soon. What's there in the Python world? One of the most obvious is TKinter, which comes standard with most Python installation. Has a lot of features. Maybe a bit old-fashioned, but it's very flexible, but has a high learning curve and a not very intuitive API. Just to show you that, here's just a very small example of an application. I'm asking for two numbers to add them up. But there you have already quite a lot of code. And not that obvious. You have to do something here to define a route. But you have to start a main loop, something with grids and there's callback options. So this is not that easy actually to do. I'll show you the same applications in a couple of minutes in TKinter. Then there are other GUI frameworks. The most well-known are WX Python, and PyQt, which is interesting because that's also cross-platform. But all of them has actually this quite long-learning curve. They are powerful, and some of them even incur license costs. For instance, PyQt. Then there are some GUI builders for interactive systems. They're not very popular in the Python world, maybe because the interfacing is rather complex. And you have to maintain both the GUI part, which is usually done in a kind of graphical interface and the application. Some of the examples are Page and PyQBoo. I'm not even sure whether they're well maintained or not. So then there's an alternative called PySymbol GUI, which is a relatively new project started two years ago. It's extremely actively maintained, which means that there are new versions, very, very frequently released. It's open source. And what's the interesting thing is that it runs actually under or on four different platforms. It's available on TKinter, which is actually the main branch. PyQt. PyQt. There's WX Python. And this is also interesting. You can also make a web interface. And in principle, they have all the same API. I want to do something with the TKinter version of PySymbol GUI. And therefore I'm going to switch to Python now. So what I want to do is build this simple other application, which has two numbers and results. Calculate button here. And we're going to build it. So start really from scratch. So the first thing you have to do is import PySymbol GUI. That's the static convention. And then we say, see this also the QT version. Then we go and define those rows. And those rows are actually just defined as a list of all the elements that are in there. So what's there? We start with a text, a text field. number one. Then we have an input field. And the input field needs to be identified later. So I just have to give it what they call a key. So that's the second field. The third field is a button with the title CalcQ. CalcQ8. Okay, that's row one. Now row two is more or less the same, of course. So I just say row two. Just change the ones and twos. Move the button. We don't have a button on this line. And then we have row three. Well, row three is actually just a, again, a text. Text result. And then followed by another field. Another text field. And that text field has to have a size because we're going to fill that later. Wait a minute. I can also do this easier. And then it has already a size. And then this one is a key. I have to reference to that. And the reference is then result. And that's actually it. Then I just say, okay, I want to formulate all those things which we call a layout. Layout is, that's a list of row one, row two, and row three. And then I just make a window. And the window is actually making this whole thing. I just add a title, adder, and a layout to indicate what it looks like. And then we can already test it. And I'm sure there's some mistakes in the window.read. This is just a dummy. Just go and test it. It's very slow for some reason. Still we made a mistake. We'll, we'll life comfort you all these people shout. Make a mistake. That's not possible now. I'm afraid. Windows not defined. Okay. Well, it doesn't do anything. Here you can see actually already whole layout and all that. But it doesn't do anything yet because I haven't defined anything. But what I'm going to replace this with a small event loop file to do always. Then I just read the, this, this window returns an event and some failures. And then I just say event is in that case, we're done. We just go and say, event is then you just get the name of the, of the bits and calculate. In this case, this is the only action that can cause a event. Then we can just get the number. So we say number one. Number one is the integer of and then we read the, this, this field here, which is them. Thank you. Then we just, this is the values of number one. Because those are all strings, we just do the next line, same story. So now we have the, the two numbers just heading them up. And then we just, we just want to do this data. Then you do that by window. And then I look up this, this value result. This is this key, this field. So I just say result.update. Result, a bit of luck. Yeah. So now I can just show you that it works. 10 plus 33 is not correct. I'm sorry. It's a slow must have to do with the zoom connection at the same time. Okay. We can just go. Okay. It's 45. And now it's problem here. And I want to show you something. If I just say an invalid value, I can just show you some of the other features. Then I just say, okay, I want to, to check this one. And then if I get a value error, because that's so easy, then I just can do a pop up saying wrong. And I do something extra in this round as well. I just say, okay, I want to have some nice, nice, nice color scheme. You can just do that with, with theme. No, there's a nice one called dark amber. And let's also just add a tool tip. Just to show you how simple that can be. I just add tool tip is enter. Then we just, well, just do a, you see here the pop up. And I can still run it, of course. It was not very spectacular. And if I go here over this one, you can see the tool tip. Well, this is just in, in 10 minutes, a, an application built. Now I want to do something else, but this is a project. Well, this is actually much more, much more useful. This is a, a kind of front end for black, in which you ask actually for a folder, the line lengths, the targets, which is a kind of, one of the input fields of, for black and an output field. Well, I'm not going to do this in live because it will take too much time, I think, but I could just go and open the, already. This is the application. This is not important. It's all about this, this part. So what you can see here, and actually it's more or less still the same. This is that folder thing. And here at the end, the zoom, the zoom system is in the way. Okay. So here we have the, we just do the browse. Well, then it's, that's some commands that you can search through the folders. Here's the line lengths. And here I do a slider. So that's this one here, this slider. And then I do a, with the, just give some, some parameters. I do a combo box for the, for the, for the target version. Also with a, with a key and all that. And then I do a text, a multi-line. A multi-line is this, this thing here, which can, which you can put whatever text you want. Then there are two buttons here. So that's our, these two. And all these ones are actually just, this one, the layout thing, because I did it all in at once. And then there's the, the main loop. And the main loop is nothing more than, than what you just saw, if the event is black. And then we do something which is a bit complicated, but the interfacing with the black system, which is a process. And then let me just run this. You can see that's already quite an, an interesting and attractive GUI to a complicated command line. And this is, well, just, just a matter of, of a couple of, of minutes, of course. And here you see, well, I've got a black thing, of course. And I can just say, okay, I want to browse. Then you get a, a browse folder. Automatically, you don't have to do anything about that. I just say, okay, I want to have a, a folder. And then we just do this one, this one. And then I just select that folder. You can see that here, I can just play with the, with the line lengths. I can play here with the, with the target version. And then I just say, okay, do it. Now in the background, it's, it's running this, this sub-process to blacken, to, to run black, which takes time apparently. The output should, should appear here in this window, but the whole system is rather slow. So, yeah. Well, in this case, there's nothing, it just says all done. This is, this is output from black. All done, two lefts, two files left and changed. And I get a popup here, which is just given here. And then we're done. So there's also a very simple, quickly built interface, but you can go much further than that. And that's what I want to show you now. For instance, where this is actually quite, quite, quite easy. This is actually an example of an application I built on, to run on an, on an Android phone, just also with the same, the same Pisci-Bucco interface. This is something to create a lockdown document here in France. We need to do that. And now I just want to show you some of the application from the site. Some interesting things and the interfacing with mudplot lip. And then you can just, this is all done in, in Parsing Bugui. You can just select all kinds of things. This is an example of a crossword puzzle. I think this is done with buttons. I'm not actually sure how this is done, but that's also one of the users who made this one. This is an interesting one. This is a, an application that's actually a, an open CV connection in which is actually kind of traffic camera, apparently something with stolen cars. I don't know what is exactly, but this is, this is a real application that, that someone made. You see all the, the different widgets that are available. Of course, it's much more available with tools, the menus and everything, spin boxes and really other things. So to conclude, well, first of all, I am by far not the, the Pisci-Bucco expert. I just know a fraction of the functionality, but I can already do quite a lot of things with it. It has really a lot of widgets and features, interfaces with all kinds of packages. Of course, there's more or less something that's given by, by Pison, of course, support threading, which is not obvious. That's quite often very complicated. It is cross-platform, which means that the different versions are more or less the same, not 100% the same. And one of the, in one of the, the interesting ports is definitely the WebRuby interface. The documentation is really super. It's a whole set of documentation with, with reference guides and a good cookbook and all that, better than a lot of the queries themselves. So it's great for beginners, that's for sure, but also experts who don't want to spend that much time. For instance, too, we have a command line interface. And then, then it's a very nice thing to do, a nice thing to have. But, well, of course, it's a pre, there are pre-packaged solutions, many, but customization, you can customize nearly all the calls, but still there are, there are limitations. So you can't control everything. And something also to consider is that this package is developed by just one man. And so continuity, well, I don't know. So to conclude, actually, I want to say PySympagooie is, is a very attractive package. Where's the give it a try? And I will say, go to, to his website, PySympagooie.com and then you will find out yourself. You can find out yourself and then you won't be disappointed, I think. And then I would like to thank you for your attention. And, well, if there are any questions, I'm here to answer them. Thanks for this. Thank you. There is one question here from Matthew. Really nice demonstration. Do you have any recommendations on when PySympagooie might be insufficient and you need to go with one of the more powerful libraries like Keykinton? Yeah, I think, I think particularly if you have, if there will be high end and you want really full control over all the placement of widgets and you want to do more things with callbacks in which you have to react on all kind of actions at the same time. This package is particularly good in the things that they defined. But I can imagine that you can't really do everything in it. But, well, as I said before, I'm not really a very gooey expert, but I understand that certain things can't be done with packages like that. But, but I also understand that at least you can escape to the, ordinary version. So, if you run PySympagooie under TKinter, for instance, you can still break into the main loop. I don't know how, but that seems to be possible. Great, thanks. Metatux is asking, does Remy serve a web server or is the output an HTML file with JavaScript? As far as I know, it goes to Remy. And then you can see immediately the output. It's really a gooey in the web. I'm not sure how, you have to have a look at Remy. And I don't know anything about Remy. I just know that there's an interface for that. And it seems a very nice demonstration of it. All right. And we have another one, which is very new to Python, programming Linux, applying this in a Linux environment. Is it as simple as Windows? I guess, is this cross-platform? Absolutely, absolutely. And actually, I think most of it is actually developed on Linux. I myself am a Windows user, but I've used it also on Raspberry Pi and Linux, no problem at all. Mac OS is okay. And so the only thing which doesn't support Python e-studies is the iPad application, running Python on the market. And there you can't use it because there's no TTA interface available. So for me, it's still a problem. All right. Thanks, Witte. I'm representing everyone watching. Okay.