I want to say this is probably one of the best GUI tutorials I've experienced. I have struggled for years trying to build customer GUI in python and I just wanted to say thank you for making this easy to understand and purposeful. SUBSCRIBED!
Ah, you're making me blush! Thanks for the kind comment and happy to hear that you found this video helpful. Good luck with your GUI project, and happy coding! 👍
Having 0 knowledge about python and someone who wants to learn and make a custom GUI app for my specific needs, this gives me high hope that it is possible for me to achieve and make one, thank you for this...
I love that they have a theme called *_SystemDefault,_* and then another one called *_SystemDefault1,..._* and then one called *_SystemDefaultForReal._* :)
at 12:46 when you create a config file, it might save as a config.ini.txt file. if it does, open the file, go to save as, "config.ini". this will convert the text document to an ini file! Took me a while to figure this out.
As I had no even bit of knowledge on python and I found your videos and drives me to learn coding and Yes you are right it’s fun, thanks for introducing me to python and your explanations are very clear and understanding. I saw your video of making gui for data entry. So ad a chef I wanted to make my own program to when I entered the data and it will go and save to a my own excel format. Thanks to you I was successful 90% . ❤ now I wrote the code and everything works, I just wanted to know how I can make it data to go and store in my format as a example Recipe name - will go to the head line and when I feed information to ingredients button it will save in specific column I want it to be. Could you please help me with that ? And keep up the good work. And in my opinion the by watching most other people you make things very clear
Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!
Glad you liked the video. Thank you very much for watching and being a member of this channel for over one year now. I truly appreciate your support! 🙏
Thank you for another amazing video! I am quite new to Python and your channel (only watched a few videos so far), and your videos make it all look really exciting! I'm a big sucker for practical applications when it comes to coding :) One thing that I can think of in terms of foolproofing: If the config file gets somehow deleted, I assume the app will crash on startup (maybe? I am new as I said), so maybe it is possible to check in the code if the config file exists, and if it doesn't proceed to create one with some default values before running anything else. I wonder how tough this will be to implement, I might actually try to do this myself in a fork in the future. PS: Love your accent!
*I am glad to hear you are enjoying them; thanks for watching and for the comment!* You have a very valid point there. The application will crash if the settings file does not exist. You could hard code any default settings in the python file to prevent this. Before loading the settings, you could check whether the settings file exists. If it does not exist, you could create a new file and dump the default settings there. Here is a complete example for you: github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Settings_Save_Load.py Take a look at line 27. I hope it helps, and also, thank you very much for the coffee donation. I appreciate it! 🙏
Hello, your videos about PySimpleGUI are awesome! I would like to ask you if you know, is it possible to insert invoice template made in excel in pysimplegui app and for example when you press a button named " Preview of your invoice " to show popup window with the template that have been made in excel? Or something like that? Thanks in advance!
Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!
Thanks for watching. I don’t remember the exact file size of my executable, but it was definitely over 10MB. The “issue” with compiling is that all the packages required to run your GUI need to be included in the executable. To ensure that you compile only the necessary packages for your application, it is recommended to create a virtual environment for your project, as shown in the video. So, turning a Python file into an executable is possible, but it comes with the downside of a potentially large final file size (even for a relatively 'simple' GUI) Cheers, Sven ✌️
Hey,this video helps me a lot. I also combined it using the simple user form to collect information. I just want to understand that whenever I am trying to print those input values in excel, file path is also getting embedded into it. Can you please help here to get specific “key” values in pysimplegui ?
Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!
Thank you for these new possibilities for me. I was wondering if you could point me in the right direction. I have two dictionaries where the field names are different. I would like the user to be able to match one field to another so that dict1[key] = dict2[newkey]. In the original the headers of the csv file needs to manually changed to match the other file. It just needs to be some event, lists or popup where I can match the field names.
Thank you for watching the video and for your question. Unfortunately, I do not know how to implement that right off the bat. I would also need to search the internet for a solution. Sorry that I cannot help!
@@CodingIsFun Thank you for your response. What I would have liked is some table structure with direct matching with clicking or selecting (Text1 = Client_Name), but the only thing I could come up with is a popup with two listboxes where one is just for show and the other is where I have to pick the right fields then do this: count = -1 for k, v in dict1.items(): count = count +1 try: dict2[selectedkeys[count]] = v except: pass But with this method the selecting must be in the right order and amount as the other.
Hey, thanks for watching! If you wanna check out how to merge Excel data using pandas and xlwings, I've got a separate video for you right here: ua-cam.com/video/AHS925L8JVk/v-deo.html After you've got your script working, you can totally build a GUI around your app with PySimpleGUI. Happy coding!
A quick google search will show you many different Python libraries. I just like the simplicity of PySimpleGUI. In regards to plotting libraries, I prefer 'Plotly'. I am not really an expert on predicting crypto prices, sorry!
hi I'm currently working on automated test data generator based on user inputs to the fields. And these inputs are provided to the user using sg.combo(list of options to select from). What I'm wondering is ,is there any way that we can provide a popup to the user when he selects an option from list of drop-down options to get more inputs from the user. For example I have options like date,name,phone number etc in the drop-down which is created using sg.Combo. Now when the user selects date from the list can we provide a popup(immediately after selecting date option)so that the user can provide different dates (starting and ending date). Similarly if he selects phone number can we provide a popup so that we can ask him what kind of phone number he is looking like any particular format (xxx-xxx-xxxx or number with country code) and so on. I have searching for this for past three days. Any suggestions from you might help me finish the major part of my problem. Thanks in advance.
Thank you for watching the video. Your questions are great, but finding the time to answer them is difficult. Kindly understand that I receive many requests for individual solutions or modifications. That said, you might want to join our Discord server (pythonandvba.com/discord) and post your question there. Thanks for your understanding. Happy Coding!
pysimplegui will now be moving to a subscription model if you can believe that. Do you think that the older version 4, if installable, could still be used without problem or interference?
Oh wow, I didn't know that. Thanks for pointing it out. I've just checked the GitHub and PySimpleGUI page. I guess that after its sunset in Q2 2024, it will continue to work but won't be further developed. This could mean it may not be compatible with newer Python versions, and there will be no bug fixes, etc. However, if you're using your GUI in a non-commercial setting (as a hobbyist), PySimpleGUI 5 will be available free of charge and is fully backward compatible. Therefore, upgrading to the latest version might be a good move.
@@CodingIsFun I'm ok with using the version of everything that I currently have, but even though I'm not a good coder, I'm developing a useful app I'm rather proud of, and so I had to ask chatgpt about installing specific versions of packages and virtual environments because I don't want to upgrade.
Hey. This was super helpful. But I am facing one issue here. I run the final script, click on settings -> save current settings -> ok (in the popup) and instead of closing only the settings window, this closes the main window as well. However if I do not include the popup feature in the settings window, and then click on save current settings button, then it works as expected and only closes the settings window. Realised that it does not actually close the main window but the main window goes into background processes. This is very undesirable. PLEASE HEL.P
@@CodingIsFun Thanks. It just turned out to be a memory issue on my PC itself. Its resolved now. However I notice that the size of .exe file is 36MB, and the startup time for the app is significant (7 seconds). Is there any way to reduce the startup time and/or reduce the size of .exe file?
Actually I am tasked with making a light and simple GUI as a front-end for some already heavy backend code. This is part of a research project with an industry partner. Can you suggest some other options for doing this?
Thank you for this amazing video! please help me, after running the code, I received this error message "Traceback (most recent call last): File "C:\Users\Ojajumi Marvellous\PycharmProjects\SETTINGS\main.py", line 105, in font_size = int(settings["GUI"]["font_size"]) TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType', please I am new in the system.
Thanks for watching. Please try to clone the entire repo from GitHub and run your code again (I assume your missing the settings file). Also, let me know if you have modified the code. Thanks!
I can help with this problem. You may be saving config.ini as a text file when saving it in Notepad and so it won't load correctly. Go into your folder and check if the type says "Text" or "Configuration settings." If it is text, then open a new instance of notepad and copy/paste the settings over. When using "save as," make sure the field "save as type:" is "All Files." Check the type again. Now it should be a configuration settings file and the program should work.
I'm only at 9:30 right now so maybe I'll see it happen but I'm noticing you don't use elif statements, is that just a preference? Is there a reason for this?
While I'm happy to try and help, it sounds like your question is beyond the scope of the tutorial and would require a custom solution. Unfortunately, I don't have the time to code something specific for every viewer. If you'd like some support and guidance from a community of like-minded people, you might want to check out my Discord server at pythonandvba.com/discord. Good luck with your project. Happy Coding!
Hi. Why is my pyinstaller applications being flagged by antivirus software. I am switching to a new UI and I want to sell my applications, but I don't know how long that would last if my software get flagged by antivirus.
Thank you for watching. Unfortunately, this issue occurs quite often. You can see more details here: stackoverflow.com/questions/43777106/program-made-with-pyinstaller-now-seen-as-a-trojan-horse-by-avg
@@CodingIsFun Thank you for the response. I have seen about compiling the bootloader but that would take many gigs to download and is complicated. Just some apps get flagged and others don't. Mystery! Why don't pyinstaller fix it.
I like to tinker around with those libraries in my leisure time. And the official streamlit documentation is also a great resource with fantastic examples for each element: docs.streamlit.io/
Thanks for watching the watching and your question. It is hard to tell from a distance what is causing the error. Try searching for the text of your error message on google/StackOverflow.
The creator of the PySImpleGUI library, Mike, created an excellent documentation and even provided example applications which you can run the browser: pysimplegui.trinket.io/demo-programs#/demo-programs/menus Happy Coding!
Hi love this guide and used it to start learning Python. 🙂 Can some body help me here.. i have a test.ini file with this in it. [TEST] 1 = 0,1,2,3 2 = 3,2,1 4 = A,B,C 5 = A,1,2,B, 3,2 AL = Temp, Man Is there a way to read the ini file like READ["TEST"] and get the 1,2,4,5, AL as a result? PS trying to learn to program python.
Thanks for watching. Here you are: import configparser # Create a configparser object config = configparser.ConfigParser() # Read the ini file config.read('test.ini') # Get the keys from the 'TEST' section keys = config.options('TEST') # Print the keys print(keys) If you like the solution, consider supporting me here: pythonandvba.com/coffee-donation Thanks!
In Python, when you import a library, you can choose to give it a different name that's easier to use in your code. In this case, the library PySimpleGUI is assigned the name "sg". This allows you to call functions from PySimpleGUI by using the shortened name "sg" instead of having to type out the full name "PySimpleGUI" each time. For example, instead of writing "PySimpleGUI.Window()", you can write "sg.Window()" to create a new window object. This can make your code more concise and easier to read.
@@CodingIsFun I have main code(python) about detect mistake document on PDF file and I want to show PDF file on gui. How can I do it? Would you recommend something? Can I Use PySimpleGUI?🥲
@@SilentReidy 1. Do you have created the settings files? 2. Ensure not to have any spelling mistakes 3. If nothing works, please clone the GitHub repo (link in the description) and run the code.
The app is not working : PS C:\Users\pc> python -u "c:\Users\pc\Desktop\Data_Entry\main.py" Traceback (most recent call last): File "c:\Users\pc\Desktop\Data_Entry\main.py", line 105, in font_size = int(settings["GUI"]["font_size"]) TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
The app is working, otherwise I would have not been able to record this video 😅 Please check if you entered a number for the font size in the settings file.
got an error, do you know why? : File "main.py", line 100, in settings = sg.UserSettings( TypeError: __init__() got an unexpected keyword argument 'use_config_file'
*What kind of programs are you planning to build with the PySimpleGUI library?* 🤓
I want to build a desktop app for integration machine learning model sentiment analysis
Didn't know about the sg.UserSettings. I would implement the parsing manually.. Nice to know now :-)
I have a simple programme selecting two date inputs with some condition checks and would like to gui this
im building a stock backtrade program
Intro genetic algorithm.
I want to say this is probably one of the best GUI tutorials I've experienced. I have struggled for years trying to build customer GUI in python and I just wanted to say thank you for making this easy to understand and purposeful. SUBSCRIBED!
Ah, you're making me blush! Thanks for the kind comment and happy to hear that you found this video helpful. Good luck with your GUI project, and happy coding! 👍
Wanted a beginner gui python library because tkinter felt old looking. Safe to say, landed in the right place!
Happy to hear that you found the video and liked it. Happy coding! Cheers, Sven ✌️
Having 0 knowledge about python and someone who wants to learn and make a custom GUI app for my specific needs, this gives me high hope that it is possible for me to achieve and make one, thank you for this...
Glad I could help! Good luck with your project and happy coding! :)
This channel is crazy... your tutorials and ideas are even more valuable than those paid courses on Udemy! Thanks for making these tutorials Sven 😇
Happy to hear that! Thanks a lot for your comments and support! 🤩
A useful and competent explanation, so I tried it and it turned out that everything works fine. Special thanks to the author for such useful content.
Glad you liked it. Thanks for watching and taking the time to leave a comment!
Excellent tutorial! One of the best I’ve seen on PySimpleGui. Perfect pace, topic coverage etc. subscribed!
Awesome, thank you and welcome aboard! 👍
You are one of the best code explainers on UA-cam! Thanks a lot!
It's very kind of you to say so, thank you! 😀
This is the best free software Ive seen. Respect.
Thanks for the kind words! I am glad you enjoyed it.
Very in-depth, but concise at the same time!
Glad it was helpful! Thanks for watching, Florian!
I follow the examples on your channel with pleasure. The examples you give are great. Thanks.
Glad you like them! Thanks for watching and taking the time to leave a comment. I appreciate it! :)
Nice. I would love to see more videos of PySimpleGUI
Thanks for watching and well noted!
Fantastic video. Easy to follow, fast and clear. Love the style.
Glad you liked it. Thanks for watching and taking the time to leave a comment!
I love that they have a theme called *_SystemDefault,_* and then another one called *_SystemDefault1,..._* and then one called *_SystemDefaultForReal._*
:)
Nice catch, I haven't noticed it 😁
This was great timing. There was one thing in particular I couldn't figure out how to do and you helped me. Thank you :D
Happy to hear that it was useful; thank you for taking the time to leave a comment and for watching the video!
at 12:46 when you create a config file, it might save as a config.ini.txt file. if it does, open the file, go to save as, "config.ini". this will convert the text document to an ini file! Took me a while to figure this out.
Glad you figured it out. Thanks for watching! Cheers, Sven ✌️
As I had no even bit of knowledge on python and I found your videos and drives me to learn coding and Yes you are right it’s fun, thanks for introducing me to python and your explanations are very clear and understanding. I saw your video of making gui for data entry. So ad a chef I wanted to make my own program to when I entered the data and it will go and save to a my own excel format. Thanks to you I was successful 90% . ❤ now I wrote the code and everything works, I just wanted to know how I can make it data to go and store in my format as a example Recipe name - will go to the head line and when I feed information to ingredients button it will save in specific column I want it to be. Could you please help me with that ? And keep up the good work. And in my opinion the by watching most other people you make things very clear
Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!
Of course no doubt you have lot of requests. It’s all good, good things take time .
You are a brilliant presenter.
Thanks for the kind words and watching the video! :)
Using your tutorial as a basis of an application to automate conversion of exported bank statements into tax return data.
Sounds existing! Good luck with your project! Happy Coding 👍
Thanks for such a wonderful and comprehensive tutorial yet very precise. A great contribution for the community , Thanks again
Thanks for the positive feedback! Appreciate you taking the time to leave a comment. 👍
your videos are inspirational, much waited week by week. thanks for your dedication !
Happy to hear that you enjoyed this one too! Thanks for the comments and support!
Will definitely try using this to modify my own what I made by seeing your videos . ❤
Wonderful! Happy Coding! :)
Thank you so much for your excellent and unique explanation. Thank you from the bottom of my heart.
Happy to hear that you liked the tutorial! 🤩
Thank you so much for your video! Your tutorial is so easy to follow, thanks!
Glad you liked the video. Thank you very much for watching and being a member of this channel for over one year now. I truly appreciate your support! 🙏
Thanks for this video,
I have a question, What font are you using on the code editor.
Thanks for watching. I think it is "Menlo" in Atom
Nice demo. Thanks
Glad to hear you liked it! Thank you for commenting and watching. 👍
Thank you for another amazing video! I am quite new to Python and your channel (only watched a few videos so far), and your videos make it all look really exciting! I'm a big sucker for practical applications when it comes to coding :)
One thing that I can think of in terms of foolproofing: If the config file gets somehow deleted, I assume the app will crash on startup (maybe? I am new as I said), so maybe it is possible to check in the code if the config file exists, and if it doesn't proceed to create one with some default values before running anything else.
I wonder how tough this will be to implement, I might actually try to do this myself in a fork in the future.
PS: Love your accent!
*I am glad to hear you are enjoying them; thanks for watching and for the comment!*
You have a very valid point there. The application will crash if the settings file does not exist. You could hard code any default settings in the python file to prevent this. Before loading the settings, you could check whether the settings file exists. If it does not exist, you could create a new file and dump the default settings there.
Here is a complete example for you: github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Settings_Save_Load.py
Take a look at line 27.
I hope it helps, and also, thank you very much for the coffee donation. I appreciate it! 🙏
@@CodingIsFun Thanks for the tip, I'll be sure to take a look!
Great Job ... Thank you. That was very helpful !
Glad it was helpful! Thank you for watching the video and for your comment! 👍
Hello, your videos about PySimpleGUI are awesome! I would like to ask you if you know, is it possible to insert invoice template made in excel in pysimplegui app and for example when you press a button named " Preview of your invoice " to show popup window with the template that have been made in excel? Or something like that? Thanks in advance!
Thanks so much for watching the video and leaving a comment! Your request is definitely noted. However, I get a ton of requests for custom solutions and, as much as I'd love to help everyone out, I just don't have the time in my schedule to develop and test all of them. I hope you can understand. Happy Coding!
Excellent video!!!
Thanks for the positive feedback! Appreciate you taking the time to leave a comment.
This was so helpful!! Thank you
Glad it was helpful! Thanks for watching! :)
❤❤❤
❤️❤️🤩
Excellente! I just subscribed.
Glad you liked the video and welcome aboard! 🥳🎉 Cheers, Sven ✌️
Great tutorial. How large was the .exe file in the end? mine is 38,297 kb. Thank you!
Thanks for watching. I don’t remember the exact file size of my executable, but it was definitely over 10MB. The “issue” with compiling is that all the packages required to run your GUI need to be included in the executable. To ensure that you compile only the necessary packages for your application, it is recommended to create a virtual environment for your project, as shown in the video. So, turning a Python file into an executable is possible, but it comes with the downside of a potentially large final file size (even for a relatively 'simple' GUI) Cheers, Sven ✌️
Amaaaaaaazinnnnnng video , very very helpfull thanks a lot you saved me a lot of time brother
Happy to hear that it was useful; thank you for taking the time to leave a comment and for watching the video!
Hey,this video helps me a lot. I also combined it using the simple user form to collect information. I just want to understand that whenever I am trying to print those input values in excel, file path is also getting embedded into it. Can you please help here to get specific “key” values in pysimplegui ?
Thank you very much for watching the video and your comment. Your requirements are well noted. Yet, I receive many requests for creating individual solutions. As much as I want to help, I simply do not find the time in my daily schedule to develop & test all the different requests. I hope you can understand. Thank you!
Thank you so much bro. Sending virtual hugs. Worked like a charm ;-)
An absolute pleasure, very happy to hear that you found it useful!
I hope you release a new video as my suggestion soon. Thank you I am from Cambodia
I will try my best, but I cannot make any promises. Greetings to Cambodia.
Amazing!
Thanks!
Sven, I quick question: for this example, are you using pysimplegui version 5 or 4?
Thanks for watching. I've used PySimpleGUI v4. Cheers, Sven ✌️
Thank you for these new possibilities for me. I was wondering if you could point me in the right direction. I have two dictionaries where the field names are different. I would like the user to be able to match one field to another so that dict1[key] = dict2[newkey]. In the original the headers of the csv file needs to manually changed to match the other file. It just needs to be some event, lists or popup where I can match the field names.
Thank you for watching the video and for your question. Unfortunately, I do not know how to implement that right off the bat. I would also need to search the internet for a solution. Sorry that I cannot help!
@@CodingIsFun Thank you for your response. What I would have liked is some table structure with direct matching with clicking or selecting (Text1 = Client_Name), but the only thing I could come up with is a popup with two listboxes where one is just for show and the other is where I have to pick the right fields then do this:
count = -1
for k, v in dict1.items():
count = count +1
try:
dict2[selectedkeys[count]] = v
except:
pass
But with this method the selecting must be in the right order and amount as the other.
Can you make a video on ms SQL connection with python with GUI
Thank you for watching the video & your suggestion.
Kudos for you!👍
Thank you! 😃
@@CodingIsFun you are welcome sir.
hanks lot Sir.. You helping us..
Glad it was helpful!
hello do you have a turtorial with merging 2 excel data using PySimpleGUI?
Hey, thanks for watching! If you wanna check out how to merge Excel data using pandas and xlwings, I've got a separate video for you right here: ua-cam.com/video/AHS925L8JVk/v-deo.html
After you've got your script working, you can totally build a GUI around your app with PySimpleGUI. Happy coding!
Any lesser known python gui libraries? Also do you know any alternatives matploblit? Anything to learn and predict crypto prices for school project?
A quick google search will show you many different Python libraries. I just like the simplicity of PySimpleGUI.
In regards to plotting libraries, I prefer 'Plotly'. I am not really an expert on predicting crypto prices, sorry!
hi I'm currently working on automated test data generator based on user inputs to the fields.
And these inputs are provided to the user using sg.combo(list of options to select from). What I'm wondering is ,is there any way that we can provide a popup to the user when he selects an option from list of drop-down options to get more inputs from the user. For example I have options like date,name,phone number etc in the drop-down which is created using sg.Combo. Now when the user selects date from the list can we provide a popup(immediately after selecting date option)so that the user can provide different dates (starting and ending date). Similarly if he selects phone number can we provide a popup so that we can ask him what kind of phone number he is looking like any particular format (xxx-xxx-xxxx or number with country code) and so on. I have searching for this for past three days. Any suggestions from you might help me finish the major part of my problem. Thanks in advance.
Thank you for watching the video. Your questions are great, but finding the time to answer them is difficult. Kindly understand that I receive many requests for individual solutions or modifications. That said, you might want to join our Discord server (pythonandvba.com/discord) and post your question there. Thanks for your understanding. Happy Coding!
pysimplegui will now be moving to a subscription model if you can believe that. Do you think that the older version 4, if installable, could still be used without problem or interference?
Oh wow, I didn't know that. Thanks for pointing it out. I've just checked the GitHub and PySimpleGUI page. I guess that after its sunset in Q2 2024, it will continue to work but won't be further developed. This could mean it may not be compatible with newer Python versions, and there will be no bug fixes, etc.
However, if you're using your GUI in a non-commercial setting (as a hobbyist), PySimpleGUI 5 will be available free of charge and is fully backward compatible. Therefore, upgrading to the latest version might be a good move.
@@CodingIsFun I'm ok with using the version of everything that I currently have, but even though I'm not a good coder, I'm developing a useful app I'm rather proud of, and so I had to ask chatgpt about installing specific versions of packages and virtual environments because I don't want to upgrade.
Brilliant
Happy to hear that it was useful; thank you for taking the time to leave a comment and for watching the video!
Thanks!
A pleasure! Thanks for watching! :)
Can i put an image instead text for substitue text keywords in Word?
Yes, that is possible. Have a look here: ua-cam.com/video/T3meVMaV8AA/v-deo.htmlsi=_vPhVryYXpHdvHDk
Happy Coding! Cheers, Sven ✌️
to the point
Thank you for your comment, Adnan Berki! I'm glad you found the content to be concise and to the point. 👍
Hey. This was super helpful. But I am facing one issue here. I run the final script, click on settings -> save current settings -> ok (in the popup) and instead of closing only the settings window, this closes the main window as well. However if I do not include the popup feature in the settings window, and then click on save current settings button, then it works as expected and only closes the settings window.
Realised that it does not actually close the main window but the main window goes into background processes. This is very undesirable. PLEASE HEL.P
Thanks for watching. Can you please clone the repo and try again? Thanks!
@@CodingIsFun Thanks. It just turned out to be a memory issue on my PC itself. Its resolved now. However I notice that the size of .exe file is 36MB, and the startup time for the app is significant (7 seconds). Is there any way to reduce the startup time and/or reduce the size of .exe file?
Actually I am tasked with making a light and simple GUI as a front-end for some already heavy backend code. This is part of a research project with an industry partner. Can you suggest some other options for doing this?
this is good thanks
Thanks!
i like the content thanks a lot ,
what's the function to convert to .txt please !!
Thanks! What have you tried so far?
Thank you
You're welcome
Thank you for this amazing video! please help me, after running the code, I received this error message "Traceback (most recent call last):
File "C:\Users\Ojajumi Marvellous\PycharmProjects\SETTINGS\main.py", line 105, in
font_size = int(settings["GUI"]["font_size"])
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType', please I am new in the system.
Thanks for watching. Please try to clone the entire repo from GitHub and run your code again (I assume your missing the settings file). Also, let me know if you have modified the code. Thanks!
I can help with this problem.
You may be saving config.ini as a text file when saving it in Notepad and so it won't load correctly. Go into your folder and check if the type says "Text" or "Configuration settings." If it is text, then open a new instance of notepad and copy/paste the settings over. When using "save as," make sure the field "save as type:" is "All Files." Check the type again. Now it should be a configuration settings file and the program should work.
It seems that psgcompiler doesn't work on MacOS... Anyone got the same issue? How can I convert it to a .app or .dmg?
thx work
You're very welcome! Thank you for watching and for the comment!
I'm only at 9:30 right now so maybe I'll see it happen but I'm noticing you don't use elif statements, is that just a preference? Is there a reason for this?
Thanks for watching. Personal preference to avoid another level of indentation. Feel free to use elif
@Coding Is Fun sweet, thank you!
Hi CodingIsFun, How to consolidate excel file from sharepoint using python.
While I'm happy to try and help, it sounds like your question is beyond the scope of the tutorial and would require a custom solution. Unfortunately, I don't have the time to code something specific for every viewer. If you'd like some support and guidance from a community of like-minded people, you might want to check out my Discord server at pythonandvba.com/discord. Good luck with your project. Happy Coding!
im having an issue with the Settings function
on "SETTINGS_PATH = Path.cwd()"
im getting an error: Unresolved reference 'Path'
Why?
Did you import the pathlib module as shown in the video?
@@CodingIsFun oh forgot
Hi. Why is my pyinstaller applications being flagged by antivirus software. I am switching to a new UI and I want to sell my applications, but I don't know how long that would last if my software get flagged by antivirus.
Thank you for watching. Unfortunately, this issue occurs quite often. You can see more details here: stackoverflow.com/questions/43777106/program-made-with-pyinstaller-now-seen-as-a-trojan-horse-by-avg
@@CodingIsFun Thank you for the response. I have seen about compiling the bootloader but that would take many gigs to download and is complicated. Just some apps get flagged and others don't. Mystery! Why don't pyinstaller fix it.
What about streamlit? Your video is third suggestion?
I like to tinker around with those libraries in my leisure time. And the official streamlit documentation is also a great resource with fantastic examples for each element: docs.streamlit.io/
If I write the pip install code, it returns an error, why? I'm from Italy, but i don't think the operation languagr matters in the prompt cmd
Thanks for watching the watching and your question. It is hard to tell from a distance what is causing the error. Try searching for the text of your error message on google/StackOverflow.
How do you even learn such niche libraries?
The creator of the PySImpleGUI library, Mike, created an excellent documentation and even provided example applications which you can run the browser: pysimplegui.trinket.io/demo-programs#/demo-programs/menus
Happy Coding!
Hi love this guide and used it to start learning Python. 🙂
Can some body help me here..
i have a test.ini file with this in it.
[TEST]
1 = 0,1,2,3
2 = 3,2,1
4 = A,B,C
5 = A,1,2,B, 3,2
AL = Temp, Man
Is there a way to read the ini file like READ["TEST"] and get the 1,2,4,5, AL as a result?
PS trying to learn to program python.
Thanks for watching. Here you are:
import configparser
# Create a configparser object
config = configparser.ConfigParser()
# Read the ini file
config.read('test.ini')
# Get the keys from the 'TEST' section
keys = config.options('TEST')
# Print the keys
print(keys)
If you like the solution, consider supporting me here: pythonandvba.com/coffee-donation
Thanks!
@@CodingIsFun Its looks fine, but it makes all entryes from the ini file into lower letters 😞
@@CodingIsFun Just used keys = [tekst.title() for tekst in keys] 🙂
What is meant by sg in first line
In Python, when you import a library, you can choose to give it a different name that's easier to use in your code. In this case, the library PySimpleGUI is assigned the name "sg".
This allows you to call functions from PySimpleGUI by using the shortened name "sg" instead of having to type out the full name "PySimpleGUI" each time. For example, instead of writing "PySimpleGUI.Window()", you can write "sg.Window()" to create a new window object.
This can make your code more concise and easier to read.
How we print out output of a function ?
Not entirely sure what you are trying to achieve, but you could use:
sg.easy_print("your message goes here")
@@CodingIsFun can you make a video about this problem?
can you show gui file location.
I don't know what you mean
Is PySimpleGUI support PDF File?
Thanks for watching. What exactly do you mean? PySimpleGUI is "just" a tool to create the GUI for your Python file.
@@CodingIsFun I have main code(python) about detect mistake document on PDF file and I want to show PDF file on gui. How can I do it? Would you recommend something? Can I Use PySimpleGUI?🥲
Has anyone has issues with the settings file not working with the font size and family, keep receiving an error
The actual error message would be helpful, I guess
@@CodingIsFun TypeError : int() argument must be a string, a btyes-like object or a real number not 'NoneType'
@@SilentReidy 1. Do you have created the settings files?
2. Ensure not to have any spelling mistakes
3. If nothing works, please clone the GitHub repo (link in the description) and run the code.
The app is not working : PS C:\Users\pc> python -u "c:\Users\pc\Desktop\Data_Entry\main.py"
Traceback (most recent call last):
File "c:\Users\pc\Desktop\Data_Entry\main.py", line 105, in
font_size = int(settings["GUI"]["font_size"])
TypeError: int() argument must be a string, a bytes-like object or a real number, not 'NoneType'
The app is working, otherwise I would have not been able to record this video 😅 Please check if you entered a number for the font size in the settings file.
100% deutsch :D
Thanks for watching!
got an error, do you know why? : File "main.py", line 100, in
settings = sg.UserSettings(
TypeError: __init__() got an unexpected keyword argument 'use_config_file'
Please ensure to use the latest PySimpleGUI version by typing 'pip install pysimplegui --upgrade' and try again. Thanks!
@@CodingIsFun It worked. Thanks
Thanks!
Thank you very much for your support. 👍 I greatly appreciate it! 🙏