Presentation is loading. Please wait.

Presentation is loading. Please wait.

Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.

Similar presentations


Presentation on theme: "Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd."— Presentation transcript:

1 Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.
Python in 5min. Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd.

2 Python 移植性に優れ、独立したプログラムを短期開発するツールとしても優れたPythonは、システム開発現場で広く使われるようにな ってきている。本書では、Pythonプログラミングの基礎を、日々のプログラミング作業でPythonをどのように利用できるかに重点を置いて解説する。初心者・熟練者を問わず、 価値ある待望の一冊。 -- オライリー・ジャパン

3 Pythonの特徴 会話型言語(にもなる)スクリプト言語 インタープリタ オブジェクト指向
Tcl、Perl、Scheme、Java とよく比較される ほとんどのOSで動作する移植性の良さ 既存のコードを組み込み可能 拡張が容易

4 例えばJavaと比べると (ある意味で)非常に良く似ている 両方ともバイトコードで動作するインタプリタ 両方ともオブジェクト指向
安全性のための制限実行(restricted execution) 他にもたくさん… 単純 (Simple) 動的 (Dynamic) 強力 (Powerful)

5 Python の誕生 Guido van Rossum (発音が難しい)が開発 1982-1986 : ABC Group
:Amoeba Project :Multimedia Group : NIST : CNRI

6 Pythonは誰のもの 1991-1995 Stichting Mathematisch Centrum
PSA(Python Software Activity)が 開発・保守 1998/10 CNRIをホストとして コンソーシアムが設立

7 Python 誕生 Amoeba(分散型OS:CWI/A.Tanenbaum )のシステム管理用のスクリプト言語として誕生
はじめのポートは Macintosh ABC, Module-3, C, Icon などの影響 名前の由来はBBCのコメディ番組

8 Python が動作するOS SCO AIX Sequent PTS BeOS SGI IRIX BSDI Solaris x86
Digital Unix (DEC OSF/1) DGUX FreeBSD HPUX Linux Mac OS OpenVMS (alpha and VAX) OS/2(emx) SCO Sequent PTS SGI IRIX Solaris x86 Sparc/Solaris Sparc/SunOS Ultrix VMS/VAX Windows 95/98/NT Windows CE * CRAY UNICOS * HITACHI HP-UX *

9 Pythonのユーザ事例 Infoseek のUltra Seek Server 11,000行のPythonプログラム
Yahoo のPeople Search RedHat のインストールツール ローレンス・リバモア研究所 Numeric Python、GIST NASA ジョンソン・スペースセンター 他にも

10 Pythonの記述例 >>> 2+2 # and a comment on the same line as code 4
>>> (50-5*6)/4 5 >>> # Integer division returns the floor: ... 7/3 2 >>> 7/-3 -3

11 Pythonの記述例 >>> width = 20 >>> height = 5*9
900 >>> L * 9 L

12 Pythonの記述例 >>> numbers = [0.3333, 2.5, 0, 10]
>>> for x in numbers: print x, try: print 1.0 / x except ZeroDivisionError: print '*** has no inverse ***' ... 0 *** has no inverse *** 10 0.1

13 例外(Exceptions) どこでも例外の発生と捕捉が可能 文字列もしくはユーザ定義 ワイルドカード捕捉がOK

14 GUI in Pyhton For UNIX For Windows Tkinter: Tcl/Tk Pwm PyGtk Tkinter
WPY wxPython

15 GUI in Pyhton 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.quit self.QUIT.pack({"side": "left"}) self.hi_there = Button(self) self.hi_there["text"] = "Hello", self.hi_there["command"] = self.say_hi self.hi_there.pack({"side": "left"})

16 GUI in Pyhton def __init__(self, master=None):
Frame.__init__(self, master) self.pack() self.createWidgets() app = Application() app.mainloop()

17 Python Internet Resources
Walnut Creek CDROM


Download ppt "Gouichi Iisaka The Company was called Cray Research Japan Co., Ltd."

Similar presentations


Ads by Google