2014年11月15日土曜日

開発環境

Practical Programming: An Introduction to Computer Science Using Python 3 (Pragmatic Programmers) (Paul Gries (著)、Jennifer Campbell (著)、Jason Montojo (著)、Lynn Beighley (編集)、Pragmatic Bookshelf)のChapter 16(Creating Graphical User Interfaces)、16.7(Exercises) 7.を解いてみる。

16.7(Exercises) 7.

コード(BBEdit)

sample1.py

#!/usr/bin/env python3
# -*- coding: utf-8 -*-

import tkinter

window = tkinter.Tk()
button = tkinter.Button(window, text='Goodbye.', command=window.destroy)
button.pack()

window.mainloop()

入出力結果(Terminal, IPython)

$ ./sample1.py
$

0 コメント:

コメントを投稿