 Hello, this is a Tech Talk video trying to answer a question that a viewer asked me that may seem kind of straightforward but is actually very vague. The user wants to know how to make a Python script with a GUI interface that is standalone. And although that seems like a pretty straightforward question, it really isn't. It's a very vague question. I get lots of questions like this from the end user that may think they're asking me a simple question or straightforward question where what they're asking is really vague and I'm trying to figure out exactly what they're trying to accomplish. So let's look at what standalone software or standalone program is. According to Wikipedia, when it comes to the term standalone software, this can be broken down into about six different categories. We can be talking about computer software that can work offline. It does not necessarily require a network connection to function. Another definition could be software that is not part of some bundled software. Another definition would be a program that is run as a separate computer process, not as an add-on or extension process. Another definition would be a standalone program, a program that does not require operating system services to run. It can also be applied to a portable application, which can be run without the need for an installation process. And finally, it can also stand for a standalone extension pack, an extension pack that do not require the original game. Now I have these six different definitions of standalone software. One of them stood out to me, the one that was labeled as a standalone program. So let's go ahead and look a little bit more at that article and what it says about standalone program. According to Wikipedia, a standalone program is a computer program that does not load any external modules, library functions, or program that is designed to boot with a bootstrap procedure of the target processor. In early computing, that is how most programs ran. You didn't have an operating system on your computer. You loaded up a disk that had your application that you booted right into. I remember playing games like this back in the day. And even in many of those cases, a lot of them will have actual DOS embedded on the disk and they would use that. So I don't even know if that would still be considered a standalone program because now you're using an operating system that's on the disk outside of the basic program. So it still is a very confusing term standalone program or standalone application or software. And definitely in these definitions, most definitions we looked at, what the user was asking was definitely not fall into any of these categories because he's asking about Python, which requires the Python libraries. Now you can take a Python script and compile it into, compile it, I say that term loosely, into a standalone application in a way where all the libraries are still embedded in a file, but you're still using those libraries in a pretty much, it's basically like a zip file that's extracting upon use and loading those modules. So by these definitions that I'm reading, at least most of them, it's not a standalone program. In fact, by the standalone program definition here, pretty much no program is because almost every program you use nowadays on at least desktop or laptop, computer and most devices, you're going to have an operating system and your programs are going to depend on that operating system for some functionality. That's why the operating system is there. But going back to the Python thing, you can package in all of your libraries and external resources, such as maybe images or sounds, into a single file that executes and basically extracts those things as they're needed. Or you can have a standalone application that basically installs that application to a directory. Basically extracting the full zip file and running it from there, maybe deletes it when it's done. So exactly what is a standalone program? Standalone software, standalone application? I think in the sense that the user was asking, I think he was asking more of how to make a single executable without the need for external resources that are already installed on the system. Now this has very little to do with how you write your program in most cases when it comes to something like Python. It depends on, it has more to do with how you package your software. And this is something I've talked about in the past. When it comes to programming, one of the hardest things there is to do, harder than programming it, is packaging it. Packaging it in a way to where it's accessible by multiple different operating systems. So you can write a program in Python and it will run on Linux, Mac, Windows. And you know what? Linux and Mac in most cases have Python installed, at least the basic parts of it. Now this user is looking to create GUIs. And if he's using something like GTK or Qt, you're going to have to have those libraries installed somehow. Either have the user install them or package them together. But Windows doesn't have Python or GTK or Qt installed by default. So you have to be sure to supply those or supply an installer. And depending on what type of libraries you're using, you may or may not have permission to do so. Luckily with things like GTK, it's free software. You're free to distribute it. But there are other cases where you might use proprietary license libraries that you may have permission to use but not necessarily distribute. And that's something to think about as well. That's why it's very important when you're writing software, if you're going to write software, not only think about what license you're going to be distributing your software under, but the libraries and other tools that you're using are they going to restrict you in a way. So it's very important to look at the licensing of that stuff when you're choosing a language or libraries or other resources for your application. And again, this has more to do with packaging when it comes to this type of standalone software. This is why I tend to go with HTML for the GUI front end for most of my applications regardless of what language I'm using. And in most cases, the user can just use whatever web browser they prefer. Now you can again create your own little web browser using WebKit or whatever libraries you want, but now you're going back to having to package stuff into your application. I try to make my programs so as much as possible that I can give the user one little thing that they click on and it all runs and is a little bit outside of what they already have installed in the system. I try to use as much as I can with what's installed on all systems. And when it comes to at least GUI interfaces, you know, everyone's got some sort of web browser, so I try to go with HTML, which was part of the conversation as well with this viewer that I'm talking to online. So again, lots of different ways to look at this, different meanings. And again, I think this user was asking more about packaging, which you can make self-extracting executable files, whether it's an EXE file or a Shell script for Mac or Linux. You can do that. I've done both in the past. I've shown you how to use built-in tools that are already on Windows for creating a self-extracting ZIP files. I've also shown how to make self-extracting ZIP files on Linux for Windows. I've also shown in the past how to create self-extracting Shell scripts, like Bash scripts, that would work on both Mac and Linux, that basically it has the binary ZIP file at the bottom of the Shell script and the top portion of the Shell script, which is the actual script, pulls that information out from itself, extracts it, and then can run scripts or use the resources from inside that ZIP file. I've gone over all that in the past. But, yeah, packaging for distribution is the hardest part of programming, if you ask me, because there's so many different platforms out there. It's easy to write one program that runs on all, but how do you package it? And again, I try to do as much as I can delivering through a web browser because that's the easiest route I have found. The end user doesn't have to do anything and it works great for mobile, desktop, small screens, big screens. That's the route I go. Saying that, though, GTK and Qt are also great, very compatible with most systems out there. Just the drawback is they have to install a lot of libraries that may be easy or difficult to install depending on how you package your software. So now this tech talk about standalone software has moved more to packaging because that's part of standalone programs in the aspect we're talking about. But again, from my point of view or from my experiences, I get lots of questions asked every day on YouTube and a lot of them are very unclear on what the people... And I know that these viewers feel like they're being very clear. I want to do this, but the terminology they're using is improper or an unclear, just like talking about standalone programs, people argue over what an operating system is and you may think an operating system is one thing and somebody else might think an operating system is something else and then I'll sit here and try to figure out, ask you questions trying to figure out which view you're looking at and the viewer tends to be confused like, why don't you know what I'm talking about? So if you ever ask me a question and I come back with a number of questions, because you have not given me enough information, whenever you ask anybody questions, try to give as much information as possible, what operating system you're using, what distribution you're using, what version of something you're using, and just as much possible if you leave out what distribution you're using, I may not be able to tell you how to install a package because you might have a different package manager, like just difference between using aptitude or apt-get, you know. Anyway, let me know below what you think about standalone programs or standalone software. What was the first thought you thought of when I said standalone program or standalone software? And has that view changed a little bit now that we've talked about a little bit more? Let me know what you think down in the comments below and as always, I hope you enjoy this video. Please visit my website, filmsbychrist.com. That's Chris at the K. There should be a link in the description. Be sure to like, share, subscribe and comment. That helps me out greatly. And as always, I hope that you have a great day.