Intermediate Python Tutorial - Creating a Text Editor App

Поделиться
HTML-код
  • Опубликовано: 1 дек 2024

Комментарии • 70

  • @TechWithTim
    @TechWithTim  11 месяцев назад +6

    Start learning Software Development today and make upwards of $100k+! techwithtim.net/dev I have a FREE intro course that walks you through the exact steps and topics you NEED to learn!

    • @judeeze7197
      @judeeze7197 11 месяцев назад

      @TechWithTim, How can i reach you privately?
      , i want to discuss something important with you

  • @juliancottman6984
    @juliancottman6984 11 месяцев назад +2

    your videos are the best on RUclips you don't just say what to do, you actually explain everything and understand what your working with i really appreciate the content.

  • @rmt3589
    @rmt3589 11 месяцев назад +6

    This is awesome! I plan to incorporate a text editor into my game engine, and this is a great logic guide!
    I'll probably use OpenGL or Qt instead of TKinter, and write it in C++, but this is a great start!

  • @Stinosko
    @Stinosko 11 месяцев назад +14

    For anyone wondering, to use bold, underline and highlight you need to use text tags and specify the area you want to alter the fonts 😊

    • @delsune
      @delsune 10 месяцев назад

      How would you go about doing that?

  • @thebuggser2752
    @thebuggser2752 10 месяцев назад +1

    Very carefully designed and clear presentation!

  • @CODE_CRAFTING_HUB
    @CODE_CRAFTING_HUB 11 месяцев назад +1

    such good video is nearly impossible to make. great job tim. love your vids😁

  • @xujason4607
    @xujason4607 11 месяцев назад

    it is just what I need ! tks so much , Tim !

  • @softwhere07
    @softwhere07 10 месяцев назад

    I always wondered how one of these things was put together. Very interesting and well explained.

  • @paulthomas1052
    @paulthomas1052 11 месяцев назад

    Great demo - Thanks Tim and Happy NY !

  • @user-dm6qe8ui7w
    @user-dm6qe8ui7w 11 месяцев назад

    Great mini project man, love from India 🇮🇳.

  • @jordanolson11
    @jordanolson11 11 месяцев назад +2

    it's so crazy, I literally was looking into a project like this, like yesterday, I was using chat GPT to step through some of the reasoning but it makes me feel like I'm in the truman show fr

  • @garrettsmith315
    @garrettsmith315 11 месяцев назад +1

    Very unique project, would definitely stand out from others.

  • @peeeters420
    @peeeters420 11 месяцев назад

    always fun and interesting to see your videos! Thanks for the content!

  • @kapibara2440
    @kapibara2440 11 месяцев назад

    Super useful video! Thank you Tim ❤

  • @nayeembinreza5266
    @nayeembinreza5266 Месяц назад

    Thanks for making these contents . I ReallyMean it

  • @CodeModCreator
    @CodeModCreator 3 месяца назад +1

    great tutorial!

  • @zccomedyclips
    @zccomedyclips 11 месяцев назад

    Very topical. I am working on a similar project but with csv files and using tkinter. Nice vid

  • @karanbaheti149
    @karanbaheti149 11 месяцев назад

    Always learn something new!

  • @alimihakeem841
    @alimihakeem841 10 месяцев назад

    Thanks for the valuable content.

  • @markmilan57
    @markmilan57 11 месяцев назад

    Good one. Keep on making a video daily.

  • @HulaHoopzz
    @HulaHoopzz 11 месяцев назад

    Would be interesting to see a video on the PySimpleGUI module, which is pretty awesome and is easier to lean than tkinter imo

  • @NSA.
    @NSA. 4 месяца назад

    Great 👍

  • @Furniez
    @Furniez 11 месяцев назад +2

    How to distribute this app to anyone who does not have python installed? When compiled to.exe the file gets detected as malware and no-one can open it.

  • @RameenFallschirmjager
    @RameenFallschirmjager 11 месяцев назад

    Hello Tim! It's been a while that I'd checked your channel. I should say you aged a bit and turned into a young handsome man. Keep up the good work buddy!

  • @caw25sha
    @caw25sha 11 месяцев назад +2

    Is it possible to set styles of individual parts of the text? I'm thinking syntax highlighting.

  • @ronelabillon2001
    @ronelabillon2001 11 месяцев назад +2

    Hi, Tim. Can I do this in kivy? Then, compile as apk for mobile phone? Thank you.

  • @EnlistedBootCamp
    @EnlistedBootCamp 10 месяцев назад

    🎯 Key Takeaways for quick navigation:
    00:14 📜 *Introduction to Python text editor project*
    - Introduction to a Python text editor project using Tkinter.
    - Mention of the project's suitability for beginner or intermediate programmers.
    - A brief mention of a related course.
    01:13 🌐 *Credit to the source of the project idea and code*
    - Credit given to a blog as the source of the project idea and some code.
    - Reference to potential future video projects based on blog ideas.
    02:10 🖼️ *Introduction to Tkinter and its capabilities*
    - Explanation of Tkinter as a graphics library for creating user interfaces.
    - Mention of the grid layout system in Tkinter.
    - Reference to the creation of a basic user interface.
    03:10 🪄 *Creating a main function and the Tkinter window*
    - Creation of a main function for Tkinter code.
    - Setting up and displaying the Tkinter window.
    - Explanation of the main loop to keep the window active.
    04:36 📐 *Configuring window size and layout*
    - Setting the title and size of the Tkinter window.
    - Introduction to grid layout and its usage.
    - Adjustment of row and column sizes within the grid.
    06:34 📊 *Creating and configuring widgets*
    - Introduction to creating text editing components (widgets).
    - Explanation of widget placement within the grid layout.
    - Setting widget attributes such as font and size.
    08:34 🎨 *Styling and positioning buttons within a frame*
    - Introduction to creating buttons and using frames in Tkinter.
    - Styling buttons with padding and expanding them horizontally.
    - Proper placement of buttons using grid within the frame.
    11:36 🖥️ *Adding functionality to buttons*
    - Introduction to adding command functions to buttons.
    - Creating functions for opening and saving files.
    - Reading and inserting file contents into the text editing component.
    17:42 📝 *Changing the window title*
    - Dynamically updating the window title to reflect the opened file.
    - Showing the file path and action in the window title.
    18:43 📝 *Lambda function for calling another function,*
    - Lambda functions are anonymous functions used to write functions in one line.
    - Demonstrates how to create a lambda function to call another function with specific arguments.
    19:13 📝 *Opening and loading a file,*
    - Shows how to open a file and load its contents into the text editor component.
    19:44 📝 *Saving a file,*
    - Explains how to save the contents of the text editor component to a file.
    20:44 📝 *Adding keyboard shortcuts,*
    - Demonstrates how to add keyboard shortcuts (Control+S and Control+O) to trigger save and open file commands.
    Made with HARPA AI

  • @joey-typing
    @joey-typing 11 месяцев назад +2

    Just if windows developers knew that it only could take them 20 minutes to write notepad

  • @HeavyPlayerGames
    @HeavyPlayerGames 8 месяцев назад +1

    hey im a beginner, i want to know that which software is this where you coding.😁😁😁

  • @softwhere07
    @softwhere07 10 месяцев назад +2

    I am having a problem. When i do the save button like i did the open button with the lamda stuff and everything like as you showed. and how its very similar to the open button. How is it that the Open button is working correctly, but I try to use the save button and i keep getting this error? "TypeError: save_file() takes 0 positional arguments but 2 were given". I mean I even used lambda like I did with the open button because I know you said you needed it to be able to do that. But why does the save one come up with this and the open one doesn't?

    • @hürriyetpalestine
      @hürriyetpalestine 8 месяцев назад

      check your code and that you put the arguments in the save_file definition
      def save_file(window, text_edit):

    • @softwhere07
      @softwhere07 8 месяцев назад

      @@hürriyetpalestine you are right. That's it right there. How did I miss that. When I looked it was an empty section. It said "save_file():" when I looked. Got that fixed.

  • @mileswilliams527
    @mileswilliams527 11 месяцев назад +6

    Sorry for being pedantic but I do believe it’s tk inter, as in interface. It’s part of the tk GUI toolkit.

    • @shawn445
      @shawn445 11 месяцев назад +3

      You’re probably right, but everyone I’ve heard pronounces it like he does.

    • @rmt3589
      @rmt3589 11 месяцев назад +3

      Lol, T Kinter goes brrrrrrrrrrr

    • @mileswilliams527
      @mileswilliams527 10 месяцев назад +1

      @@shawn445 first time I've heard it pronounced like this. Then again, I've been doing this a while now, so I knew that Tk was a widget library, originally written for the Tcl programming language, but with many bindings to other languages, one of which being Python. So seeing the name Tkinter it was obvious that it should be pronounced Tk Inter as it is simply a python library for creating graphical user interfaces with the use of the Tk GUI toolkit. Not only is it for creating GUInterfaces, it is a binding to Tk, basically an interface between Python and Tk, hence Tkinter.

    • @shawn445
      @shawn445 10 месяцев назад +1

      @@mileswilliams527 I understand that, but just like so many other things, how it is pronounced and what it was supposed to be are two different things.

    • @mileswilliams527
      @mileswilliams527 10 месяцев назад

      @@shawn445 that’s true. I guess it’s just going to have to be like gif and jif, where the two parties just have to agree to disagree.

  • @soldierboy7105
    @soldierboy7105 11 месяцев назад

    Awesome

  • @thegoodlifewatch
    @thegoodlifewatch 10 месяцев назад

    Hi Tim does this work on mac? the window is not coming up on my mac

  • @neshkeev
    @neshkeev 11 месяцев назад

    Let's build a text editor so you can build text editor while building a text editor)

  • @Just_A_Tech.._
    @Just_A_Tech.._ 11 месяцев назад

    Tnx👍

  • @mostafaboras
    @mostafaboras 11 месяцев назад +1

    i just dont understand why did you wrote
    text_editor.delete (1.0,tk.END)

    • @ases4320
      @ases4320 10 месяцев назад +1

      To clear potential text written in the window before opening the file (to show the file content you need a clear canvas or the stuff would mix)

  • @grantsgaming1
    @grantsgaming1 11 месяцев назад

    made my menu horizontal top instead of vertical side

  • @alpixfere
    @alpixfere 11 месяцев назад +2

    i thought about making a text editor before and me before using my tiny brain thing that i need to use pygame that only does graphic for me and i need to create a whole new text system, i can't belive that i never thought of use tkinter. anyway nice video i liked it and i did the project.

  • @Car2hell975
    @Car2hell975 11 месяцев назад

    How to make simulation like satisfying ba11s , project jdm and math floyd

    • @Car2hell975
      @Car2hell975 11 месяцев назад

      No one is talking about this topic

  • @rverm1000
    @rverm1000 11 месяцев назад

    They are now blocking the resolution of your videos. At 360 it's not visible

  • @echo_the_developer
    @echo_the_developer 4 месяца назад

    imagine if someomone makes the next intellij idea with this

  • @zachfenton608
    @zachfenton608 10 месяцев назад

    Made one 3 years ago

  • @Andrew-Tsegaye
    @Andrew-Tsegaye 11 месяцев назад +1

    Tim please the next video should be an advanced AI python course for intermediate to advanced programmers.

    • @rmt3589
      @rmt3589 11 месяцев назад +6

      That's a big ask to randomly comment.

    • @Andrew-Tsegaye
      @Andrew-Tsegaye 11 месяцев назад +1

      @@rmt3589 absolutely! 💯 but, fr we need it. I want to become a real master of python and I'm going to work on a company.

  • @big123lak
    @big123lak 9 месяцев назад

    Why does tkinter feel like cheating and also I don’t understand why we need to lambda another function we’re calling anyway it’s the same for tic tax toe it makes hella confusing

    • @hürriyetpalestine
      @hürriyetpalestine 8 месяцев назад

      he explained it, though not in depth. If you 'call the function directly' when you assign it to command, the function will be called right away when the program starts and not when the button is clicked. By having command being assigned lambda as the function, you're getting around this limitation.

  • @tahakocer4947
    @tahakocer4947 10 месяцев назад

    yeni yorum

  • @toz_dumann
    @toz_dumann 11 месяцев назад

    it would be way better if you could explain what does every line exactly do in the video. Like what happens if I put 800 there instead of 5000, or what happens if I make the font times new roman? would that work? it would take about 5 minutes or so to really try to make us understand. thx for the introduction anyway.

    • @hürriyetpalestine
      @hürriyetpalestine 8 месяцев назад

      or you could just EXPERIMENT and see what happens.

    • @toz_dumann
      @toz_dumann 8 месяцев назад

      @@hürriyetpalestine i will not bother linking you to my drive where my exe file sits there. I did try and ExPerIMEnt and didnt see any difference. So I wondered what does it actually do. Also why there are beta testers and such then? Cant developers just ExperMEnT and see their mistakes?

  • @carlabest1257
    @carlabest1257 11 месяцев назад +1

    Using tkinter is like walking with boots made of lead. Takes too long - too tough - so unnecessary. Anything short of a visual editor is a waste of time.
    This is not a reflection of the video - just the technology. I use MS visual studio. I can create complex windows applications in a fraction of the time it would take to use tkinter. Don't waste your time - don't use tkinter unless it is for the most trivial application.

    • @rmt3589
      @rmt3589 11 месяцев назад +1

      I'll probably use OpenGL or Qt instead.

  • @daminrido2269
    @daminrido2269 11 месяцев назад

    Hi

  • @rishiraj2548
    @rishiraj2548 11 месяцев назад

    👍🙂👍

  • @user-ov1ps7go4m
    @user-ov1ps7go4m 10 месяцев назад

    7:10

  • @RIFADOR001
    @RIFADOR001 11 месяцев назад

    tkinter is so annoying... You cannot mix some widgets but it's not clear which have to be avoided...