Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Starting Python
Search
Kentaro Kawano
July 10, 2017
Programming
160
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Starting Python
Pythonを始められるような基本的なところ
Kentaro Kawano
July 10, 2017
More Decks by Kentaro Kawano
See All by Kentaro Kawano
Goでのレシーバーとnilの関係 / Receiver and nil relationship in Go
kawaken
0
540
Goの時刻に関するテスト/Testing time in Go
kawaken
0
170
AWS Lambda + Go
kawaken
0
150
goaのdesignをラクに書く/Write goa design easily
kawaken
0
140
Goでのチーム開発とコード管理の悩み/Team development and code management in Go
kawaken
0
140
Pyvmomiとansibleのdynamic inventory
kawaken
0
150
Other Decks in Programming
See All in Programming
dotNET_vulnclicker_intro.pdf
deka_morita
0
120
Atomic Design, Enforced: Scaling Mobile Design Systems (next.app devCon / droidCon Berlin 2026)
steliosf
PRO
0
140
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
570
CodeRabbitの効果検証と過ごしてみた3ヶ月
armondando
0
190
re:Inventに行く前に知っておきたい現地参加のノウハウ
nokomoro3
0
380
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
21
21k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
190
Embedded Swiftで作る自作USBデバイス によるiOSデバイスの自動テスト / iOSDC Japan 2026 glassfiber
glassfiber
0
310
大喜利で理解するLLM as a Judge / Understanding LLM-as-a-Judge through Ogiri
rockname
0
200
Vue Fes Japan の “作る側”に関わってみて
naokihaba
0
130
SalesForceを内製化!? ~ HR事業を支える顧客管理基盤のインフラを大公開 ~
oku053
0
150
コードレビューのボトルネックを"する側"と"される側"の両面から解消する
yub0n
2
1.5k
Featured
See All Featured
Build your cross-platform service in a week with App Engine
jlugia
234
19k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.7k
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
270
jQuery: Nuts, Bolts and Bling
dougneiner
66
8.6k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.4k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3k
Everyday Curiosity
cassininazir
0
350
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
510
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
68
58k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
3k
Git: the NoSQL Database
bkeepers
PRO
433
67k
Transcript
Pythonͷ࢝Ίํ
࠷ۙPython͕Γ্͕͍ͬͯΔ
201511݄Ҏ߱(46த)
Δ͔͠ͳ͍ʂ ͜ͷϏοάΣʔϒʹʂ
CentOSͳΒPython͕ΠϯετʔϧࡁΈ $ python Python 2.6.6 (r266:84292, Aug 18 2016, 15:13:37)
[GCC 4.4.7 20120313 (Red Hat 4.4.7-17)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> print "Hello World" Hello World >>> exit()
͓ΘΓ
ͱ͍͏༁ʹ͍͔ͳ͍
CentOSͰ όʔδϣϯ͕ݹ͍
PythonͷόʔδϣϯҠߦʹ͍ͭͯ ɺ͍͜ͱͬͯΔͱͯ͠৭ʑ ࢥ͏ͱ͜Ζ͕͋Γ·͢ɻ͜ͷ͘ ͳΔͷͰࠓׂѪ͢Δ͚Ͳɺͱʹ͔ ͘ࠓʮPython3ܥΛ͏ʯͷ͕ྑ͍ Ͱ͢ɻͰɺAWSLambda2ܥͰπ ϥΠɻGoΛ͍·͠ΐ͏ɻ
None
Πϯετʔϧ(OLD) • xbuild ͕ศར $ git clone https://github.com/tagomoris/xbuild.git $ cd
xbuild $ ./python-install 3.5.2 ~/local/python-3.5.2
Πϯετʔϧ • ඪ४ͷΠϯετʔϥʔΛ͍·͠ΐ͏ • https://www.python.org/downloads/ • ࠷৽ 3.6.0 • όʔδϣϯϚωʔδϟෆཁʢޙड़ʣ
SDKͷόʔδϣϯཧ ෳͷPythonΛΠϯετʔϧ͢Δͱ… % ls /usr/local/bin/python3* /usr/local/bin/python3@ /usr/local/bin/python3.5m-config@ /usr/local/bin/python3-32@ /usr/local/bin/python3.6@ /usr/local/bin/python3-config@
/usr/local/bin/python3.6-32@ /usr/local/bin/python3.5@ /usr/local/bin/python3.6-config@ /usr/local/bin/python3.5-32@ /usr/local/bin/python3.6m@ /usr/local/bin/python3.5-config@ /usr/local/bin/python3.6m-config@ /usr/local/bin/python3.5m@ ͜͏ͳΔɻ
ݸผͷϓϩδΣΫτͷόʔδϣϯʁ • venv ΛͬͯSDKࣗମΛόϯυϧ͢Δ % pwd /Users/kekawano/hoge % python3.5 -m
venv venv % ls venv/ % ls venv/ bin/ include/ lib/ pip-selfcheck.json pyvenv.cfg
venv ͷ͍ํ • όʔδϣϯͷݻఆ • ͍͍ͨpython -m venv σΟϨΫτϦ໊ •
༗ޮԽ • source σΟϨΫτϦ໊/bin/activate • ແޮԽ • deactivate
ྫ % which python /usr/bin/python % source venv/bin/activate % which
python /Users/kekawano/hoge/venv/bin/python % python -V Python 3.5.1 % deactivate % python -V Python 2.7.10
ύοέʔδཧ • pip Λ͏ % which pip /Users/kekawano/hoge/venv/bin/pip % pip
install flask % pip show flask ... Location: /Users/kekawano/hoge/venv/lib/python3.5/site-packages ... • venv Ͱڥ͕ด͍ͯ͡ΔͷͰGlobalʹӨڹ͠ͳ͍ • PyPI - the Python Package Index : Python Package Index
؆୯ͳWebΞϓϦ from flask import Flask app = Flask(__name__) @app.route("/") def
hello(): return "Hello world!" if __name__ == "__main__": app.run()
Pythonͷಛ • ಈతܕ͚ݴޠ • Indented Block • ܭࢉͷϥΠϒϥϦ๛
࠷ۙͷPython • ඇಉظॲཧʹରԠ async/await • จࣈྻͷf-string • type hinting
ύοέʔδ • module = file • mod1.py • package =
directory • mod2/init.py
࣮ߦ python mod1.py python mod2 • mod2/main.py