程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
您现在的位置: 程式師世界 >> 編程語言 >  >> 更多編程語言 >> Python

A help function solves the problem of viewing all document information in Python

編輯:Python

stay python The interactive command line in provides help Function to query each module , Or public functions , Or the function interface under the module help Function to view the interface documentation .

【 Read the whole passage 】

However, to view such documents, you still have to have some English skills , Include functions 、 modular 、 Variables are introduced in English .

1、 Module document viewing

Open console , The console tool used here is cmder, Looks better than the default cmd The command line looks much better .

For example, you need to view pandas Module interface documentation , have access to help("pandas") Command view .

Because the current page may not be enough to display a module's document , So you can keep pressing enter Key to view the document line by line until it is finished .

2、 modular . Function document view

The same is true with pandas Take the function of module as an example , Take a look at this time pandas.read_csv Function interface documentation .

Also use the constant press enter Key to view the document line by line .

3、 View public function documents

Description of common functions , such as print Function is the standard common function in common use . The same is used when viewing interface documents help Order to see .

One help The command solves all the document interface viewing functions , Including module interfaces 、 The functions below the module 、 Public functions can use help Function to view related documents .

【 Past highlights 】

python Custom exception /raise Keyword throws an exception

python Local music player production process ( Complete source code attached )

Automation tools :PyAutoGUI Mouse and keyboard control , A sharp weapon for freeing hands !

Have you ever seen a birthday cake from a programming ape ?

Lazy man python operation , You always need to import only one library into your code ...


  1. 上一篇文章:
  2. 下一篇文章:
Copyright © 程式師世界 All Rights Reserved