Buttons & Events – Kivy Mobile and Desktop App Dev w/ Python

Welcome to part 2 of the Kivy tutorials. In this tutorial, we’re going to be working on buttons and events.

Text-based tutorial and sample code: https://pythonprogramming.net/buttons-events-kivy-application-python-tutorial/

Channel membership: https://www.youtube.com/channel/UCfzlCWGWYyIQ0aLC5w48gBQ/join
Discord: https://discord.gg/sentdex
Support the content: https://pythonprogramming.net/support-donate/
Twitter: https://twitter.com/sentdex
Facebook: https://www.facebook.com/pythonprogramming.net/
Twitch: https://www.twitch.tv/sentdex
G+: https://plus.google.com/+sentdex

29 comments

  1. Shritam Kumar Mund on

    What is the reason, most of the mobile developer doesn’t start to make there App with Kivy? What is your prediction on mobile development with python in the near future?

    Reply
  2. Nyx AIoT on

    Good video! However, there’s one thing I would wanna ask. Can you actually make the layout better like resizing the layout so that it won’t be so big as the widgets you added doesn’t really use up the whole window.

    Reply
  3. Sébastien Lavoie on

    Superb as always! Cheers! I personally like very much unpacking variables on the fly, so at 7:55, you could have something like:
    prev_ip, prev_port, prev_username = f.read().split(“,”)
    It’s just splitting the list right into variables while unpacking. I know you know, but for those who didn’t, now you do! 😉

    Reply
  4. no name on

    Could you please make it clear for me? Does Kivy allow to pack an application into apk file, the same as pyinstaller does it for Windows? Or we need a sort of launcher to start kivy-written script on a mobile phone? I’m not a proficient programmer at all, but now and then I like to code useless projects.

    Reply
  5. Alexey on

    Could you please make it clear for me? Does Kivy allow to pack an application into apk file, the same as pyinstaller does it for Windows? Or we need a sort of launcher to start kivy-written script on a mobile phone? I’m not a proficient programmer at all, but now and then I like to code useless projects.

    Reply
  6. Tissuebox on

    hey sentdex, great tutorial!

    I saw that you were wondering about what serie to make next, I would really like a Swift tutorial if this is possible, it seems like a very promising language, again, thank you for the continuous content.

    Reply
  7. PDM Vlogs on

    Continue Sir, You are the best!
    I am going to be a computer engineer/science student. What is the best language for me?

    Reply
  8. Sh Mj on

    Can you please make a series on Basic computer Algorithms like path finding algorithms and sieve of Eratosthenes and many others using python it would be of great help thanks

    Reply
  9. Pradyoth Shandilya on

    Brilliant. I’ve searched for a kivy tutorial from you multiple times before. Glad to see you’ve done it

    Reply
  10. Nicolas Gomez Rubio on

    I’m getting this error:
    File …kivyapp2.py”, line 29, in __init__
    self.join = Button(text = “Join”)
    NameError: name ‘Button’ is not defined
    how can I solve it please?
    Thank you very much for all your videos, i’m pretty new to this world of programming and I’m learning many things with you

    Reply
  11. Shashank Tanwar on

    I love your videos. they are short , simple and easy to grasp. I like the way you try to explain what each line and argument is doing. Thanks and keep making more. !!! I am from data science background where we only write scripts without any classes but I want to learn oops to make somthing really cool….just like you!!

    Reply
  12. Michael Kondrashin on

    More pythonic way for loading preferences:
    import errno

    try:
    with open(“prev_details.txt”) as f:
    d = f.read().split()

    except IOError as e:
    if e.errno != errno.ENOENT:
    raise
    prev_pi = “”

    Reply
  13. Debajyoti Majumder on

    Hi sentdex, I have a story to tell. I saw your CV2-python tutorial and became fairly confident in it. Then, I went to stack overflow to answer some cv2 question, so that, I can have at least 15 rep to upvote stuff. Then I answered a question…..10 min later Downvoted…..so soul crushing(even though my code worked). Did this ever happen to you dex , when you were a beginner?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

Show Buttons
Hide Buttons