0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

簡単なGUIアプリケーションを作るために紹介されている PySimpleGUIを使ってみました。

環境

  • Debian Testing (2024/7/6時点のDebian 13)
  • python 3.11.9
  • PySimpleGUi 5.0.6

事前準備

# apt install python3-pip
# apt install python3-tk

PySimpleGUI インストール

今回はシステムにインストール。

# pip install --break-system-package  PySimpleGUI

プログラム

こちらにあるサンプルプログラムを実行

import PySimpleGUI as sg

# All the stuff inside your window.
layout = [  [sg.Text("What's your name?")],
            [sg.InputText()],
            [sg.Button('Ok'), sg.Button('Cancel')] ]

# Create the Window
window = sg.Window('Hello Example', layout)

# Event Loop to process "events" and get the "values" of the inputs
while True:
    event, values = window.read()

    # if user closes window or clicks cancel
    if event == sg.WIN_CLOSED or event == 'Cancel':
        break

    print('Hello', values[0], '!')

window.close()

最初の起動

License Agreement が出る。
image.png
Free Trial を選択。

image.png

image.png

プログラムを実行すると、TRIAL メッセージが表示される。
image.png

簡単に使うには?

PySimpleGUI は Ver.5 から有料になったよう。それでも Hobbyst だと 無料 となっている。

image.png

とはいえ、 register が必要になっていてちょっと面倒。

0
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?