Develop Windows apps with Python 3 + Tkinter (Preparation)

Introduction

Let's create a Windows GUI application using the standard Python library "Tkinter".

Preparation

Install eclipse

This time, I will use Eclipse as the IDE and PyDev as the execution environment for Python.

First, download the Python Full Edition of "Pleiades All in One Eclipse" from the following URL.

https://mergedoc.osdn.jp/index.html#/pleiades_distros2020.html

Unzip the downloaded zip file and move the pleiades folder inside to directly under the C drive.

Eclipse settings

Change Eclipse's default interpreter to Python 3.

Eclipse (C:\pleiades\eclipse\ Start eclipse.exe) and open [Window]-> [Settings] from the menu.

05.png

Open [PyDev]-> [Interpreter]-> [Python Interpreter] in the left menu. Select "Python3" and click the [Up] button to move "Python3" to the top, and click the [Apply and Close] button.

10.png

Creating a project

Create an Eclipse project.

Right-click in the blank area of "Pydev Package Explorer" on the left side and open [New]-> [Project].

20.png

Select [Pydev Project] under [PyDev] and click the [Next] button.

21.png

Enter an appropriate project name (testproj1 this time) and click the [Finish] button.

22.png

Creating a python script

Add a Python program to the created project.

Right-click the project you just created in "Pydev Package Explorer" on the left, and click [New]-> [File].

23.png

Enter an appropriate file name (test1.py this time) and click the [Finish] button.

24.png

Enter the following code in test1.py and save it.

import tkinter as tk

if __name__ == '__main__':
    root = tk.Tk()

    root.title('test')
    root.geometry('300x200')

    label01 = tk.Label(text='Hello, World!')
    label01.pack()

    root.mainloop()

Click the ▼ mark to the right of the play button at the top of Eclipse and select Run-> Run Python.

30.png

The execution result of the program is displayed.

31.png

Now you are ready to develop your Windows app.

Next time, I'll try using various Tkinter UI components.

Recommended Posts

Develop Windows apps with Python 3 + Tkinter (Preparation)
Develop Windows apps with Python 3 + Tkinter (exe file)
[Python] Creating multiple windows with Tkinter
Efficiently develop Azure Python apps with CI/CD
Scraping with Python (preparation)
Python starting with Windows 7
Programming with Python and Tkinter
Python with VS Code (Windows 10)
Run python with PyCharm (Windows)
Machine learning with Python! Preparation
Run Label with tkinter [Python]
[GUI with Python] PyQt5 -Preparation-
Time synchronization (Windows) with Python
[Python] Show multiple windows in Tkinter
Face detection with YOLO Face (Windows10, Python3.6)
Build mlpy with python3.3 (64bit) (windows 64bit)
Use Windows 10 speech synthesis with Python
Getting started with Python 3.8 on Windows
[Python Windows] pip install with Python version
Play video with sound with python !! (tkinter / imageio)
Run servo with Python on ESP32 (Windows)
Make GUI apps super easy with tkinter
Building a Python 3.6 environment with Windows + PowerShell
Run (legacy) Windows apps with Windows Application Driver
Let's develop an investment algorithm with Python 1
Preparation for scraping with python [Chocolate flavor]
Create a frame with transparent background with tkinter [Python]
FizzBuzz with Python3
Scraping with Python
Project cannot be created with Python3.5 (Windows) + django1.7.1
Statistics with python
Python on Windows
Scraping with Python
Python with Go
python windows environment
GUI image cropping tool made with Python + Tkinter
Python (Windows 10) Virtual Environment / Package with VS Code
Twilio with Python
GUI automation with Python x Windows App Driver
Install OpenCV 4.0 and Python 3.7 on Windows 10 with Anaconda
Python installation (Windows)
Play with 2016-Python
[Python] I made a Youtube Downloader with Tkinter.
Tested with Python
MVC with Tkinter
python starts with ()
Image Processing with Python Environment Setup for Windows
Monitor Python apps with New Relic's APM (Flask)
with syntax (Python)
How to use tkinter with python in pyenv
Bingo with python
Zundokokiyoshi with python
To you who develop Python under Windows & proxy
Use Python / Django with Windows Azure Cloud Service!
Excel with Python
Microcomputer with Python
[Python] Tkinter template
Cast with python
Problems with windows python being called on pipenv on WSL
[Heroku] Memo for deploying Python apps using Heroku on Windows [Python]
Summary of tools for operating Windows GUI with Python