GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.
Click here to load reader
-
Upload
oswin-cannon -
Category
Documents
-
view
218 -
download
3
Transcript of GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.
![Page 1: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/1.jpg)
GUI Programming with Python
Gouichi IisakaThe Company was calledCray Research Japan Co., Ltd.
![Page 2: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/2.jpg)
GUI のためのモジュール
For UNIX Tkinter: Tcl/Tk, Pwm OpenGL Interface PyGtk
For Windows Tkinter WPY WxPython: Python + wxWindow
![Page 3: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/3.jpg)
グラフィック関連モジュール
Python Image LibraryGIST: Scientific Graphic Package gdmodulevtk: Visualization Tool Kit
The Visualization ToolkitAn Object-Oriented Approach To 3D GraphicsWill Schroeder, Ken Martin, Bill Lorensen646 pages, 40 color pages, CD-ROM with software/dataISBN 0-13-954694-4Prentice Hall
Http://www.python.org/download/Contributed.html#Graphics
![Page 4: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/4.jpg)
Tkinter のサンプルコード
from Tkinter import *
class Application(Frame): def say_hi(self):
print "hi there, everyone!"
def createWidgets(self):self.QUIT = Button(self)self.QUIT["text"] = "QUIT"self.QUIT["fg"] = "red"self.QUIT["command"] = self.quitself.QUIT.pack({"side": "left"})self.hi_there = Button(self)self.hi_there["text"] = "Hello",self.hi_there["command"] = self.say_hiself.hi_there.pack({"side": "left"})
![Page 5: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/5.jpg)
Tkinter のサンプルコード(つづき)
def __init__(self, master=None):Frame.__init__(self, master)
self.pack()self.createWidgets()
app = Application()app.mainloop()
![Page 6: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/6.jpg)
Tkinter クラス一覧
![Page 7: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/7.jpg)
wxPython
wxWindows を使用多くのプラットホームで動作するGUI クラスライブラリMotif 、 Xview 、 Xt 、 Win32. WxWindows
![Page 8: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/8.jpg)
wxPython
![Page 9: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/9.jpg)
PyGtk
GTK(GIMP Tool Kit) を使用Perl インタフェースもある
![Page 10: GUI Programming with Python Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.](https://reader038.fdocuments.net/reader038/viewer/2022100501/5697bfae1a28abf838c9c6bd/html5/thumbnails/10.jpg)
Python での GUI
基本はグルー言語拡張して GUI クラスライブラリを使用す
る極論はライブラリ次第