I give up, it's really hard to follow along with this because of how convoluted this is compared to every other Tkinter tutorial I've watched. That would be fine, but I'm about half way through, and I've got this problem I cannot figure out, but I have no chance of figuring this out because all the comments are just "I'm going to do this" which has given me no point of reference. This is like more of a video you'd put in your portfolio to prove you're already a genius.
Trust me, I have been coding for years, and the only way to learn is to get your hands dirty, and sweat and blood, trials and errors, these tutorials are not going to teach you anything, find some website enrol, take few courses and seek projects, and build projects, preferably with a tutor “hence” tutorial. These guys are here to show off, "look what we can do", and believe me, you need to understand the very basics first, and the concepts, all of the functions and methods are secondary, you will learn them in time and nobody knows all the functions, but you need to know what you’re about to create then look for the right tools to build it, but you need to know how to use those tools. That’s all there is to it. Start learning to code, 20 minutes every day and in three months you will learn to do many things all by yourself. My advice is start learning to use python, C++, JavaScript, etc… and using tkinter, kivy will only teach you how to code with tkinter and kivy, and then if you’re forced to use real coding, you will find yourself stranded in the middle of nowhere.
There is no genius, you learn to code like you learn to drive a car, to ride a bike, to play the piano, guitar, or to learn to speak another language the key is practice that’s all, no genius there.
Yes, it would be nice if he explained more why he is doing things, but I've followed along and it is working. Use your brain and try to think what is happening. Use pencil and paper to go through some of the steps if it helps.
Very useful video. Absolutely advanced and short but still highly effective. Expect more contents from you. I'm new to this Object Oriented Programming. So would like to have some lessons from you. Also I request you to make video on a python GUI Dictionary and a GUI Address/Contact Book. It will be so helpful if it's so. 😍😍
Thanks for the tutorial, it helps me a lot, I learnt a lot with this video. You're doing a great job ! I was writing some python code before but never with gui, now I want to learn more from tkinter !!
I literally found this on git while browsing lol it's a cool programme. I have my own calculator code on git but it doesn't have any GUI just basic calculations on a good old terminal
sir can you also make a video while i typing a number in the entry widget the number must separate in thousand for example if i'm typing 1200 it must separate 1,200
Hi, just managed to follow the complete code with NO errors but even then it would just simply not run at all since I just could not install the venc (the virtual environment in python) for some reason. It kept telling me that this computer is missing some permissions for running scripts. So as a result while working on the code I could only rely on no error reporting method (available from within pycharm code window. However, I decided to finalize the code and managed to install pyinstaller in hope that it will run after packing the file into an executable (ready for my win 10 64Bit pro) but to my surprise, the app that I created still doesn't open, and doesn't complain at all. I do not see any error window showing up. I even tried to run the executable file as admin and in compatibility mode but still doesn't work. It is really frustrating after 2 days of working on this code still no joy. Now, what ??? Am I stuck here forever??? Please help anyone outthere. Tnx alot.
You probably figured it out but I also encountered the same error. Fortunately enough I'm in the era of chatgpt so i was able to find a solution using this command "Set-ExecutionPolicy -Scope CurrentUser RemoteSigned" Paste this command on your terminal when you encounter that problem and it should be fixed. You can then proceed to activate your venv using the activation command. Hopefully this helps
On the output screen which is calculator GUI I can't see the operator symbols other than addition. I can see all the numbers, C, = but can't see other operators which are -,%,*. So can you please help me out with it. I used same syntax that you used.
i try run this code what he try run in 5.40 but when i run it " Error running 'calc': Cannot run program "C:\Users\Käyttäjä\PycharmProjects\animation\venv\Scripts\python.exe" (in directory "C:\Users\Käyttäjä\Desktop\calculator"): CreateProcess error=2, The system cannot find the file specified" help
This video leaves me with mixed feelings. It shows important solutions that everyone will come across when working with tkinter. But one thing bothers me a lot. In this video there is little explanation of why such decisions were made and what the long-term benefits are. For example, I wondered why we don't fill the dictionary with all the buttons. Later in the video this becomes clear, but the viewer must ultimately make the findings himself. Likewise, the concept of updating the label didn't really make sense to me until later and you just had to accept it during the implementation. In the end, the video probably shows interesting concepts, but doesn't really go into why things are solved this way, but simply does it.
It's impossible to debug because none of it explained well at all. I've tried comparing code exactly and I can't explain why I'm having this problem (the numbers appearing at the top but not the bottom display label). But his "I'm just going to---" comments make no sense.
Thank you so much for this amazing tutorial! I've learned a lot from it. There is only one thing i don't understand and it is why when trying to solve the problem where pressing any key would resulti in only "." being printed on the screen, "lambda x=digit: self.add_to_expression(x)" works, but "lambda: self.add_to_expression(digit)" doesen't. Keep up the amazing work!
I believe that in the first case at the moment of calling the self.add_to_expression(digit) through the lambda function the value of the argument (digit) will corrispond to the last value assigned in the loop (In our case "."). In the second case, with lambda x=digit: self.add_to_expression(x) we assign a default argument to x that corrisponds to the value of digit at the step of the loop where the button is created (The button showing "1" will have a default value of "1", "2" of "2" and so on)
Hello greetings from Venezuela, I am learning python and I decided to do this exercise with you. I'm having trouble using the calculator with the keyboard. I use linux mint, will there be a configuration problem with linux? Thank you for your time. There I send you an extract of the code. Thanks in advance. # using calculator from the keyboard def bind_keys(self): self.window.bind("", lambda event: self.evaluate()) for key in self.digits: self.window.bind(str(key), lambda event, digit = key: self.add_to_expression(digit)) for key in self.operations: self.window.bind(key, lambda event, operator = key: self.append_operator(operator))
I had also trouble with the keyboard. Please add to the function bind_keys: self.window.bind("", lambda event: self.clear()) # add clear key self.window.bind("", lambda event: self.square()) # add square key with pressed self.window.bind("", lambda event: self sqrt()) # add square-root key with pressed. I had no trouble with and keys on my keyboard. If you have, try any other key of yourchoice to perform add_to_expression()
Nice tutorial! help me a lot to learn more. Im starting my journey in python and this challenge is very good. But can I ask you a basic thing? Instead of having all the functions in the main .py can we divide them in different scripts and them import to the main or it has to be all in the same? Thanks
very interesting tutorial.straight forward steps but i had an issue when adding Functionality to the Buttons,it doesnt display the value when clicked even i corrected this line of code "command=lambda x=digit: self.add_to_expression(x)"
def click(value): ex = entryField.get() answer = '' try: if value == 'C': #Here c = Clear button (works like a backspace key) ex = ex[0:len(ex) - 1] entryField.delete(0, END) entryField.insert(0, ex) return This will be your command.... now just insert a button using tkinter button command and you are good to go.
try starting again from scratch. or try copying just the basic start code from his code at GitHub. I had that problem at first, and couldn't figure out why it didn't work for me.
Isn't that how you're supposed to learn? Don't be hesitant to search things in Google...no one is going to make videos specifically catering to your needs. Happy learning!
@@imcgrzainwh4379 what's the point of making this video if he doesn't actually SAY why he's doing the things he does and why the code is structured the way it is? This video is only useful for the code in the description that you can download and use for reference in personal projects
I have a problem for some time, when I try to open a .exe file that has been created from a python file it opens a console and then it instantly coses it. I'm not sure what should I do to fix this. Any help is appreciated