Python
     wzyang@kkbox.com
• docstring
• pydoc
• ipython
• doctest
• sphinx
docstring
docstring

•         Class        Method
                   Class    Method

•              Class    Method
    __doc__
class MyClass():
	

 def plus(self, x):
	

 	

 return x + 1

mc = MyClass()
y = mc.plus(1)
'This is a module'

class MyClass():
	

 'This is my Class'
	

	

 def plus(self, x):
	

 	

 'The method pluses one.'
	

 	

 return x + 1

mc = MyClass()
print mc.__doc__
print mc.plus.__doc__
'This is a module'

class MyClass():
	

 def plus(self, x):
	

 	

 return x + 1

import sys
print sys.modules[__name__].__doc__
pydoc
$pydoc MyClass
Python 的文件系統
$pydoc -p 8080
Python 的文件系統
ipython.
A better interactive mode.
   $easy_install ipython
Python 的文件系統
Python 的文件系統
doctest
class MyClass():
	

 def plus(self, x):
	

 	

 '''
	

 	

 The method pluses one.

	

   	

   >>> mc = MyClass()
	

   	

   >>> mc.plus(1)
	

   	

   2
	

   	

   '''
	

   	

   return x + 1

if __name__ == '__main__':
	

 import doctest
	

 doctest.testmod()
Python 的文件系統
Sphinx
$easy_install sphinx
$sphinx-quickstart
Python 的文件系統
:mod:`MyClass` Module
+++++++++++++++++++++

This is my class...

.. autoclass:: MyClass.MyClass
	

 :members:
$make html
Python 的文件系統

More Related Content

PDF
NUS-ISS Learning Day 2019-Deploying AI apps using tensor flow lite in mobile ...
PPT
POLITEKNIK MALAYSIA
PPS
CS101- Introduction to Computing- Lecture 26
PDF
Neural networks using tensor flow in amazon deep learning server
PPT
Spsl v unit - final
PDF
How to Create Database component -Enterprise Application Using C# Lab
PDF
Using Java Streams
PDF
Keras cheat sheet_python
NUS-ISS Learning Day 2019-Deploying AI apps using tensor flow lite in mobile ...
POLITEKNIK MALAYSIA
CS101- Introduction to Computing- Lecture 26
Neural networks using tensor flow in amazon deep learning server
Spsl v unit - final
How to Create Database component -Enterprise Application Using C# Lab
Using Java Streams
Keras cheat sheet_python

What's hot (20)

PDF
Introduction to deep learning using python
PDF
7 Habits For a More Functional Swift
PPT
قائمة القارات
PPTX
Javascript Arrays
PPTX
Data preprocessing for Machine Learning with R and Python
PDF
Day 4a iteration and functions.pptx
PDF
Day 4b iteration and functions for-loops.pptx
PDF
Probabilistic Programming in Scala
PDF
Scala - en bedre Java?
PPTX
DPLYR package in R
PDF
Smalltalk
PPTX
Statistics - ArgMax Equation
PDF
A quick python_tour
KEY
R for Pirates. ESCCONF October 27, 2011
DOCX
Java assgnmt2.
PDF
Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...
PDF
Java misc1
PDF
Arrays in python
PPTX
SQL Server Select Topics
PPTX
Java dates
Introduction to deep learning using python
7 Habits For a More Functional Swift
قائمة القارات
Javascript Arrays
Data preprocessing for Machine Learning with R and Python
Day 4a iteration and functions.pptx
Day 4b iteration and functions for-loops.pptx
Probabilistic Programming in Scala
Scala - en bedre Java?
DPLYR package in R
Smalltalk
Statistics - ArgMax Equation
A quick python_tour
R for Pirates. ESCCONF October 27, 2011
Java assgnmt2.
Mini-lab 1: Stochastic Gradient Descent classifier, Optimizing Logistic Regre...
Java misc1
Arrays in python
SQL Server Select Topics
Java dates
Ad

More from Weizhong Yang (20)

PDF
Flutter BLE
PDF
怎樣在 Flutter app 中使用 Google Maps
PDF
關於延長役期這件事情
PDF
Dart null safety
PDF
導入 Flutter 前你應該知道的事
PDF
Github Actions
PDF
iPlayground: CarPlay and MFI Hearing Aids
PDF
CocoaPods private repo
PDF
Flutter 踩雷心得
PDF
那些年被蘋果 Ban 掉的 API
PDF
給 iOS 工程師的 Flutter 開發
PDF
給 iOS 工程師的 Vue.js 開發
PDF
苦集滅道:透過開發客製 Sketch Plug-in 改善產品設計流程
PDF
使用 switch/case 重構程式碼
PDF
怎樣寫出比較沒有問題的 Code
PDF
貪食蛇
PDF
Aspect Oriented Programming
PDF
Mac OS X 與 iOS 的 Audio API
KEY
Html 5 native drag
KEY
Retina mac
Flutter BLE
怎樣在 Flutter app 中使用 Google Maps
關於延長役期這件事情
Dart null safety
導入 Flutter 前你應該知道的事
Github Actions
iPlayground: CarPlay and MFI Hearing Aids
CocoaPods private repo
Flutter 踩雷心得
那些年被蘋果 Ban 掉的 API
給 iOS 工程師的 Flutter 開發
給 iOS 工程師的 Vue.js 開發
苦集滅道:透過開發客製 Sketch Plug-in 改善產品設計流程
使用 switch/case 重構程式碼
怎樣寫出比較沒有問題的 Code
貪食蛇
Aspect Oriented Programming
Mac OS X 與 iOS 的 Audio API
Html 5 native drag
Retina mac
Ad

Recently uploaded (20)

PDF
A review of recent deep learning applications in wood surface defect identifi...
PDF
OpenACC and Open Hackathons Monthly Highlights July 2025
PDF
CloudStack 4.21: First Look Webinar slides
PPTX
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
PDF
Credit Without Borders: AI and Financial Inclusion in Bangladesh
PDF
Convolutional neural network based encoder-decoder for efficient real-time ob...
PDF
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
PPT
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
PDF
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
PDF
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
PDF
Consumable AI The What, Why & How for Small Teams.pdf
PDF
giants, standing on the shoulders of - by Daniel Stenberg
PDF
Comparative analysis of machine learning models for fake news detection in so...
PDF
sustainability-14-14877-v2.pddhzftheheeeee
PDF
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
PDF
UiPath Agentic Automation session 1: RPA to Agents
PDF
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
PPTX
TEXTILE technology diploma scope and career opportunities
PDF
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
PDF
Enhancing plagiarism detection using data pre-processing and machine learning...
A review of recent deep learning applications in wood surface defect identifi...
OpenACC and Open Hackathons Monthly Highlights July 2025
CloudStack 4.21: First Look Webinar slides
GROUP4NURSINGINFORMATICSREPORT-2 PRESENTATION
Credit Without Borders: AI and Financial Inclusion in Bangladesh
Convolutional neural network based encoder-decoder for efficient real-time ob...
The-Future-of-Automotive-Quality-is-Here-AI-Driven-Engineering.pdf
Galois Field Theory of Risk: A Perspective, Protocol, and Mathematical Backgr...
Transform-Your-Factory-with-AI-Driven-Quality-Engineering.pdf
“A New Era of 3D Sensing: Transforming Industries and Creating Opportunities,...
Consumable AI The What, Why & How for Small Teams.pdf
giants, standing on the shoulders of - by Daniel Stenberg
Comparative analysis of machine learning models for fake news detection in so...
sustainability-14-14877-v2.pddhzftheheeeee
Transform-Your-Supply-Chain-with-AI-Driven-Quality-Engineering.pdf
UiPath Agentic Automation session 1: RPA to Agents
Transform-Quality-Engineering-with-AI-A-60-Day-Blueprint-for-Digital-Success.pdf
TEXTILE technology diploma scope and career opportunities
Dell Pro Micro: Speed customer interactions, patient processing, and learning...
Enhancing plagiarism detection using data pre-processing and machine learning...

Python 的文件系統

Editor's Notes