From: Yuriy Gomenyuk <All-yvg@ukr.net>
To: ALT <community@altlinux.ru>
Subject: [Comm] tkinter
Date: Tue, 8 Oct 2002 12:54:11 +0300
Message-ID: <20021008125411.729024f8.All-yvg@ukr.net> (raw)
Здравствуйте,
Установил с Сизифа python22 и tkinter22,
Набрал с книги простой пример (вычисление площади круга), запускаю файл - появляется только пустой серый квадратик с заголовком.
Никаких полей для ввода, кнопок...
в чём может быть ошибка?
текст примера:
******
#!/usr/bin/env python
from Tkinter import *
import math
def Square(radius):
return math.pi * radius**2
def calculate_square():
radius = float(radius_entry.get())
try:
square = "%11.3f" % Square(radius)
except:
square = "?"
square_label.configure(text=square)
root = Tk()
root.title("Площадь круга")
frame = Frame(root)
radius_entry = Entry(frame, width=10)
radius_entry.grid(row=0, column=0)
square_label = Label(frame, text="?")
square_label.grid(row=0, column=1)
eval_button = Button(frame, text="Вычислить", width=10,
command=calculate_square)
eval_button.grid(row=1, column=0)
exit_button = Button(frame, text="Выход", width=10,
command=root.destroy)
exit_button.grid(row=1, column=1)
root.mainloop()
******
Или что набрать, чтобы проверить, что ktinter работает нормально?
--
С уважением,
Юрий Гоменюк.
next reply other threads:[~2002-10-08 9:54 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-08 9:54 Yuriy Gomenyuk [this message]
2002-10-08 11:26 ` aen
2002-10-08 10:29 ` Yuriy Gomenyuk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021008125411.729024f8.All-yvg@ukr.net \
--to=all-yvg@ukr.net \
--cc=community@altlinux.ru \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
ALT Linux Community general discussions
This inbox may be cloned and mirrored by anyone:
git clone --mirror http://lore.altlinux.org/community/0 community/git/0.git
# If you have public-inbox 1.1+ installed, you may
# initialize and index your mirror using the following commands:
public-inbox-init -V2 community community/ http://lore.altlinux.org/community \
mandrake-russian@linuxteam.iplabs.ru community@lists.altlinux.org community@lists.altlinux.ru community@lists.altlinux.com
public-inbox-index community
Example config snippet for mirrors.
Newsgroup available over NNTP:
nntp://lore.altlinux.org/org.altlinux.lists.community
AGPL code for this site: git clone https://public-inbox.org/public-inbox.git