• Stars
    star
    120
  • Rank 295,983 (Top 6 %)
  • Language
    Python
  • License
    Other
  • Created over 7 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Tkinter tutorial for beginners.

Tkinter Tutorial for Beginners

When I was getting started with Python I loved writing Tkinter GUIs. At first they felt really complicated because the tutorial I was following wasn't very good. Even the hello world example had a class with inheritance, and I didn't know what was a class at the time.

This tutorial consists of minimal examples and explains common mistakes. You don't need to have any experience in GUI programming to read this tutorial, and you don't even need to know what is a GUI. All you need is basic Python skills.

If you need help, you're not alone! Click here to go to a free Python help chat. If you see Akuli in the user list, that's me.

Which GUI toolkit?

GUI is short for Graphical User Interface. It means a program that we can use without a command prompt or a terminal, like a web browser, a file manager or an editor.

Tkinter is an easy way to write GUIs in Python. Unlike bigger GUI toolkits like Qt and GTK+, tkinter comes with Python so many Python users have it already. Tkinter works on Windows, Mac OSX and Linux, so it's a good choice for writing cross-platform programs. For example, I have written Porcupine using tkinter.

Tkinter is not a good choice if you want to write programs mainly for Linux users. Most Linux distributions don't come with tkinter and tkinter applications look different than Qt and GTK+ applications on Linux. On the other hand, many Linux distributions come with GTK+, so I recommend using that if you want to write programs for Linux users.

You can also use PyQt if you want to write cross-platform GUI programs. It doesn't come with Python and installing it can be difficult, but PyQt programs look good on Windows, Mac and Linux.

Tkinter is light, but it's also limited in some ways. For example, you can't write a web browser in tkinter, but it's possible to write web browsers in GTK+ and PyQt. Simpler things like text editors and music players can be written in tkinter.

List of contents

  1. Getting Started
  2. Buttons
  3. Geometry Managers
  4. Dialogs
  5. There will be more stuff here later...
  6. Event Loop and Threads

More Repositories

1

python-tutorial

A Python 3 programming tutorial for beginners.
Python
1,354
star
2

porcupine

A decent editor written in tkinter
Python
157
star
3

teek

Simpler alternative to tkinter.
Python
31
star
4

math-tutorial

Practical math tutorial for programmers.
Python
25
star
5

curses-minesweeper

Minesweeper game written in curses with zig
Zig
17
star
6

jou

Yet another programming language
Python
11
star
7

mantaray

An IRC client written in Python with Tkinter.
Python
11
star
8

git-guide

A practical guide to using git with github that hopefully doesn't suck.
Mako
7
star
9

classtree

A program that prints a tree of classes in a Python module.
Python
6
star
10

odotdot

Funny programming language
C
6
star
11

asda

My attempt at making a statically typed programming language
Python
5
star
12

oomph

Yet another attempt at making a usable programming language
Python
4
star
13

import-that

Bad Python practice tutorial.
4
star
14

py-tree-sitter-builds

Binary wheels for using py-tree-sitter without a C compiler
Python
4
star
15

derivater

Simple symbolic calculation library for Python
Python
3
star
16

math-derivations

Derivations and proofs of math things
Python
3
star
17

BananaGUI

Simple wrapper for popular Python GUI toolkits.
Python
3
star
18

triotk

Tiny module for using Trio with Tkinter
Python
2
star
19

stupid-c-repl

Stupid REPL for C and C++
Python
2
star
20

music-theory

A website that explains music theory using mathematics (Finnish)
Python
2
star
21

weird-language

weird programming language
Python
1
star
22

the-simple-noteprogram

Simple note-taking program written in Python 3 with GTK+ 3.
Python
1
star
23

mathpaste-gtk

Gtk program for using mathpaste
Python
1
star
24

happy-birthday

Happy birthday zaab :)
Python
1
star
25

snake

My version of the classic snake game. It's not as boring as you think it is...
Python
1
star
26

curses-klondike

Terminal klondike solitaire game
C++
1
star
27

mittari

Analog CPU and RAM usage meters for my computer
Python
1
star
28

gtk-reminder

Simple reminding program written in C using GTK+ 3.
C
1
star
29

potti

IRC bot that lets users run arbitrary Python code
Python
1
star
30

catris

The classic game of falling blocks, but with online multiplayer
Rust
1
star