新聞中心
這里有您想知道的互聯(lián)網(wǎng)營銷解決方案
創(chuàng)新互聯(lián)Python教程:怎么查看python文檔
查看文檔是一個程序員的基本功,這里簡單介紹幾種查看Python文檔的方法,下面以struct模塊為例。

創(chuàng)新互聯(lián)公司是專業(yè)的定邊網(wǎng)站建設公司,定邊接單;提供網(wǎng)站設計、網(wǎng)站制作,網(wǎng)頁設計,網(wǎng)站設計,建網(wǎng)站,PHP網(wǎng)站建設等專業(yè)做網(wǎng)站服務;采用PHP框架,可快速的進行定邊網(wǎng)站開發(fā)網(wǎng)頁制作和功能擴展;專業(yè)做搜索引擎喜愛的網(wǎng)站,專業(yè)的做網(wǎng)站團隊,希望更多企業(yè)前來合作!
1.help
在交互模式下,help函數(shù)是獲取文檔的好幫手,使用非常簡單。
>>> import struct >>> help(struct) Help on module struct: NAME struct DESCRIPTION Functions to convert between Python values and C structs. Python bytes objects are used to hold the data representing the C struct and also as format strings (explained below) to describe the layout of data in the C struct. The optional first format char indicates byte order, size and alignment: @: native order, size & alignment (default) =: native order, std. size & alignment <: little-endian, std. size & alignment >: big-endian, std. size & alignment !: same as > The remaining chars indicate types of args and must match exactly; these can be preceded by a decimal repeat count: x: pad byte (no data); c:char; b:signed byte; B:unsigned byte; ?: _Bool (requires C99; if not available, char is used instead) h:short; H:unsigned short; i:int; I:unsigned int;
2.__doc__
__doc__是每個對象都有的屬性,其存放了對象文檔。
3.離線文檔
安裝Python時會自帶一個chm格式的離線文檔Python documention,該文檔的信息比較全。
4.離線模塊文檔
Python針對模塊還有一個單獨的文檔,該文檔在瀏覽器中查看。
5.在線文檔。
Python學習網(wǎng),大量免費的學習資源,歡迎學習!
網(wǎng)站欄目:創(chuàng)新互聯(lián)Python教程:怎么查看python文檔
網(wǎng)頁鏈接:http://www.5511xx.com/article/cooccoj.html


咨詢
建站咨詢
