Enviar pesquisa
Carregar
從 REPL 到 IDE
•
Transferir como PPTX, PDF
•
0 gostou
•
698 visualizações
Justin Lin
Seguir
使用 REPL 設定原始碼檔案編碼 基本模組與套件管理 認識 IDE 的使用
Leia menos
Leia mais
Tecnologia
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 27
Baixar agora
Recomendados
從 REPL 到 IDE
從 REPL 到 IDE
Justin Lin
《Python 3.5 技術手冊》第二章草稿
《Python 3.5 技術手冊》第二章草稿
Justin Lin
open() 與 io 模組
open() 與 io 模組
Justin Lin
函数调用关系工具-2011-孙光福
函数调用关系工具-2011-孙光福
Wu Liang
Python 起步走
Python 起步走
Justin Lin
Device Driver - Chapter 6字元驅動程式的進階作業
Device Driver - Chapter 6字元驅動程式的進階作業
ZongYing Lyu
Device Driver - Chapter 3字元驅動程式
Device Driver - Chapter 3字元驅動程式
ZongYing Lyu
Shell(bash) Scripting
Shell(bash) Scripting
Robby Lee
Recomendados
從 REPL 到 IDE
從 REPL 到 IDE
Justin Lin
《Python 3.5 技術手冊》第二章草稿
《Python 3.5 技術手冊》第二章草稿
Justin Lin
open() 與 io 模組
open() 與 io 模組
Justin Lin
函数调用关系工具-2011-孙光福
函数调用关系工具-2011-孙光福
Wu Liang
Python 起步走
Python 起步走
Justin Lin
Device Driver - Chapter 6字元驅動程式的進階作業
Device Driver - Chapter 6字元驅動程式的進階作業
ZongYing Lyu
Device Driver - Chapter 3字元驅動程式
Device Driver - Chapter 3字元驅動程式
ZongYing Lyu
Shell(bash) Scripting
Shell(bash) Scripting
Robby Lee
Python 编程艺术
Python 编程艺术
wilhelmshen
Erlang jiacheng
Erlang jiacheng
Air-Smile
Php Extension--yahoo(Cc0cc)
Php Extension--yahoo(Cc0cc)
sunlick
Python系列3
Python系列3
數真 蔡
Free rtos workshop1@nuu
Free rtos workshop1@nuu
紀榮 陳
Python系列4
Python系列4
數真 蔡
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
Simen Li
Python系列1
Python系列1
數真 蔡
Erlang开发及应用
Erlang开发及应用
litaocheng
2. 從 REPL 到 IDE
2. 從 REPL 到 IDE
Justin Lin
Python01
Python01
俊杰 李
執行緒與並行API
執行緒與並行API
Justin Lin
简单Pthon教程
简单Pthon教程
junjun chen
建置Python開發環境
建置Python開發環境
吳錫修 (ShyiShiou Wu)
Learn python 2 - Real World Case
Learn python 2 - Real World Case
Chia-Hao Tsai
Java Tutorial:Learn Java in 06:00:00
Java Tutorial:Learn Java in 06:00:00
Justin Lin
Adorable python
Adorable python
Rhythm Sun
CH10:輸入輸出
CH10:輸入輸出
Justin Lin
Continuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CI
Chu-Siang Lai
Tiptop gp 5.1 setup_instructions
Tiptop gp 5.1 setup_instructions
guest994aeb5
Oracle Security 101
Oracle Security 101
Dahui Feng
Web scraping入門1
Web scraping入門1
兆欽 丘
Mais conteúdo relacionado
Mais procurados
Python 编程艺术
Python 编程艺术
wilhelmshen
Erlang jiacheng
Erlang jiacheng
Air-Smile
Php Extension--yahoo(Cc0cc)
Php Extension--yahoo(Cc0cc)
sunlick
Python系列3
Python系列3
數真 蔡
Free rtos workshop1@nuu
Free rtos workshop1@nuu
紀榮 陳
Python系列4
Python系列4
數真 蔡
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
Simen Li
Python系列1
Python系列1
數真 蔡
Erlang开发及应用
Erlang开发及应用
litaocheng
Mais procurados
(9)
Python 编程艺术
Python 编程艺术
Erlang jiacheng
Erlang jiacheng
Php Extension--yahoo(Cc0cc)
Php Extension--yahoo(Cc0cc)
Python系列3
Python系列3
Free rtos workshop1@nuu
Free rtos workshop1@nuu
Python系列4
Python系列4
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
[ZigBee 嵌入式系統] ZigBee Architecture 與 TI Z-Stack Firmware
Python系列1
Python系列1
Erlang开发及应用
Erlang开发及应用
Semelhante a 從 REPL 到 IDE
2. 從 REPL 到 IDE
2. 從 REPL 到 IDE
Justin Lin
Python01
Python01
俊杰 李
執行緒與並行API
執行緒與並行API
Justin Lin
简单Pthon教程
简单Pthon教程
junjun chen
建置Python開發環境
建置Python開發環境
吳錫修 (ShyiShiou Wu)
Learn python 2 - Real World Case
Learn python 2 - Real World Case
Chia-Hao Tsai
Java Tutorial:Learn Java in 06:00:00
Java Tutorial:Learn Java in 06:00:00
Justin Lin
Adorable python
Adorable python
Rhythm Sun
CH10:輸入輸出
CH10:輸入輸出
Justin Lin
Continuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CI
Chu-Siang Lai
Tiptop gp 5.1 setup_instructions
Tiptop gp 5.1 setup_instructions
guest994aeb5
Oracle Security 101
Oracle Security 101
Dahui Feng
Web scraping入門1
Web scraping入門1
兆欽 丘
Python简明教程
Python简明教程
ingong
2, OCP - installing and creating a database
2, OCP - installing and creating a database
ted-xu
Continuous Delivery with Ansible x GitLab CI (2e)
Continuous Delivery with Ansible x GitLab CI (2e)
Chu-Siang Lai
Semelhante a 從 REPL 到 IDE
(16)
2. 從 REPL 到 IDE
2. 從 REPL 到 IDE
Python01
Python01
執行緒與並行API
執行緒與並行API
简单Pthon教程
简单Pthon教程
建置Python開發環境
建置Python開發環境
Learn python 2 - Real World Case
Learn python 2 - Real World Case
Java Tutorial:Learn Java in 06:00:00
Java Tutorial:Learn Java in 06:00:00
Adorable python
Adorable python
CH10:輸入輸出
CH10:輸入輸出
Continuous Delivery Workshop with Ansible x GitLab CI
Continuous Delivery Workshop with Ansible x GitLab CI
Tiptop gp 5.1 setup_instructions
Tiptop gp 5.1 setup_instructions
Oracle Security 101
Oracle Security 101
Web scraping入門1
Web scraping入門1
Python简明教程
Python简明教程
2, OCP - installing and creating a database
2, OCP - installing and creating a database
Continuous Delivery with Ansible x GitLab CI (2e)
Continuous Delivery with Ansible x GitLab CI (2e)
Mais de Justin Lin
Ch14 簡介 Spring Boot
Ch14 簡介 Spring Boot
Justin Lin
Ch13 整合 Spring MVC/Security
Ch13 整合 Spring MVC/Security
Justin Lin
Ch12 Spring 起步走
Ch12 Spring 起步走
Justin Lin
Ch11 簡介 JavaMail
Ch11 簡介 JavaMail
Justin Lin
Ch10 Web 容器安全管理
Ch10 Web 容器安全管理
Justin Lin
Ch09 整合資料庫
Ch09 整合資料庫
Justin Lin
Ch08 自訂標籤
Ch08 自訂標籤
Justin Lin
Ch07 使用 JSTL
Ch07 使用 JSTL
Justin Lin
Ch06 使用 JSP
Ch06 使用 JSP
Justin Lin
Ch05 Servlet 進階 API、過濾器與傾聽器
Ch05 Servlet 進階 API、過濾器與傾聽器
Justin Lin
Ch04 會話管理
Ch04 會話管理
Justin Lin
Ch03 請求與回應
Ch03 請求與回應
Justin Lin
Ch02 撰寫與設定 Servlet
Ch02 撰寫與設定 Servlet
Justin Lin
CH1. 簡介 Web 應用程式
CH1. 簡介 Web 應用程式
Justin Lin
14. 進階主題
14. 進階主題
Justin Lin
13.並行、平行與非同步
13.並行、平行與非同步
Justin Lin
12. 除錯、測試與效能
12. 除錯、測試與效能
Justin Lin
11. 常用內建模組
11. 常用內建模組
Justin Lin
10. 資料永續與交換
10. 資料永續與交換
Justin Lin
9. 資料結構
9. 資料結構
Justin Lin
Mais de Justin Lin
(20)
Ch14 簡介 Spring Boot
Ch14 簡介 Spring Boot
Ch13 整合 Spring MVC/Security
Ch13 整合 Spring MVC/Security
Ch12 Spring 起步走
Ch12 Spring 起步走
Ch11 簡介 JavaMail
Ch11 簡介 JavaMail
Ch10 Web 容器安全管理
Ch10 Web 容器安全管理
Ch09 整合資料庫
Ch09 整合資料庫
Ch08 自訂標籤
Ch08 自訂標籤
Ch07 使用 JSTL
Ch07 使用 JSTL
Ch06 使用 JSP
Ch06 使用 JSP
Ch05 Servlet 進階 API、過濾器與傾聽器
Ch05 Servlet 進階 API、過濾器與傾聽器
Ch04 會話管理
Ch04 會話管理
Ch03 請求與回應
Ch03 請求與回應
Ch02 撰寫與設定 Servlet
Ch02 撰寫與設定 Servlet
CH1. 簡介 Web 應用程式
CH1. 簡介 Web 應用程式
14. 進階主題
14. 進階主題
13.並行、平行與非同步
13.並行、平行與非同步
12. 除錯、測試與效能
12. 除錯、測試與效能
11. 常用內建模組
11. 常用內建模組
10. 資料永續與交換
10. 資料永續與交換
9. 資料結構
9. 資料結構
從 REPL 到 IDE
1.
2.
2. 從 REPL
到 IDE • 學習目標 – 使用 REPL – 設定原始碼檔案編碼 – 基本模組與套件管理 – 認識 IDE 的使用 2
3.
使用 REPL • REPL(Read-Eval-Print
Loop,又稱為 Python Shell) 3
4.
4
5.
取得協助訊息 5
6.
6
7.
7
8.
8
9.
• 如果要離開 REPL
環境,可以執行 quit() 函式 9
10.
撰寫 Python 原始碼 10
11.
11
12.
12
13.
哈囉!世界! • 事物的複雜度不會憑空消失,只會從一個 事物轉移到另一個事物 13
14.
UTF-8 • Python 3
之後,python 直譯器預期的原 始碼檔案編碼必須是 UTF-8 14
15.
• 使用註解設定編碼資訊 • 在
Python 原始碼檔案中,# 開頭代表這 是一行註解 15
16.
• 到其他的編碼設定方式 • python
直譯器只要在註解中看到 coding=<encoding name> 或者 coding: <encoding name> 出現 # -*- coding: Big5 -*- # vim: set fileencoding=Big5 : 16
17.
簡介模組 • 每個 .py
檔案本身就是一個模組 • 直接重用先前撰寫好的 hello2.py 檔案 17
18.
• Python 本身提供有標準程式庫 18
19.
• 如果有多個模組需要 import,除了逐行 import
之外,也可以在單一行中使用逗號 「,」來區隔模組 • 在 __builtins__模組中的函式、類別等 名稱,都可以不用 import 直接取用,而 且不用加上模組名稱作為前置 import sys, email 19
20.
設定 PYTHONPATH • 可以設定
PYTHONPATH 環境變數來解決這 個問題: 20
21.
21
22.
• 想要動態地管理模組的尋找路徑, 也可以 透過程式變更
sys.path 的內容來達到 22
23.
使用套件管理模組 • 模組也應該分門別類加以放置 • 一定要有一個__init__.py
檔案,該資料夾 才會被視為一個套件 • 在套件的進階管理中,__init__.py 中其實 也可以撰寫程式 23
24.
• 套件名稱會成為名稱空間的一部份 • 可以建立多層次的套件,每個擔任套件的 資料夾與子資料夾中,各要有一個 __init__.py 24
25.
import as、from import •
import as • from import 25
26.
• 如果有多個名稱想要直接匯入目前模組, 除了逐行 from
import 之外,也可以在 單一行中使用逗號「,」來區隔 • 更偷懶一點(不建議) 26
27.
使用IDE • PyCharm(www.jetbrains.com/pycharm/) • PyDev(www.pydev.org/) •
Komodo IDE(komodoide.com/) • Spyder (code.google.com/archive/p/spyderlib/) • WingIDE(wingware.com/) • NINJA-IDE(www.ninja-ide.org/) • Python Tools for Visual Studio (pytools.codeplex.com/) 27
Baixar agora