python自带help功能怎么使用_第1页
python自带help功能怎么使用_第2页
python自带help功能怎么使用_第3页
python自带help功能怎么使用_第4页
python自带help功能怎么使用_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

第python自带help功能怎么使用C:\Users\wusongpython

Python3.8.2rc1(tags/v3.8.2rc1:8623e68,Feb112025,10:46:21)[MSCv.191664bit(AMD64)]onwin32

Typehelp,copyright,creditsorlicenseformoreinformation.

输入help()

help

Typehelp()forinteractivehelp,orhelp(object)forhelpaboutobject.

help()

WelcometoPython3.8shelputility!

IfthisisyourfirsttimeusingPython,youshoulddefinitelycheckout

thetutorialontheInternetat/3.8/tutorial/.

Enterthenameofanymodule,keyword,ortopictogethelponwriting

PythonprogramsandusingPythonmodules.Toquitthishelputilityand

returntotheinterpreter,justtypequit.

TogetalistofavAIlablemodules,keywords,symbols,ortopics,type

modules,keywords,symbols,ortopics.Eachmodulealsocomes

withaone-linesummaryofwhatitdoes;tolistthemoduleswhosename

orsummarycontainagivenstringsuchasspam,typemodulesspam.

help

这句话:Togetalistofavailablemodules,keywords,symbols,ortopics,typemodules,keywords,symbols,ortopics.

意思就是:

要获取可用模块、关键字、符号或主题的列表,请键入模块、关键字、符号或主题。

modules

我们先看下modules

在help模式下输入:modules

helpmodules

PleasewaitamomentwhileIgatheralistofallavailablemodules...

D:\software_install\python\lib\pkgutil.py:92:UserWarning:Thenumpy.array_apisubmoduleisstillexperimental.SeeNEP47.

__import__()

PILasyncpgidnaselenium

PyInstalleratexitimaplibserial

PyQt5atlastkimghdrsetuptools

__future__attrimpshelve

_abcattrsimportlibshlex

_astaudioopinspectshutil

_asynciobackportsiosignal

_bisectbase64iPaddresssimplejson

_blake2bcryptitertoolssite

_bootlocalebdbjinja2six

_bz2billiardjsonsmtpd

_cffi_backendbinasciikeywordsmtplib

_codecsbinhexkiwisolversndhdr

_codecs_cnbisectkombusniffio

_codecs_hkbroadcasterlib2to3socket

_codecs_iso2025builtinslibfuturizesocketserver

_codecs_jpbz2libpasteurizesocks

_codecs_krcProfilelinecachesockshandler

_codecs_twcalendarlocalesortedcontainers

_collectionsceleryloggingsqlalchemy

_collections_abccertifilogurusqlite3

_compat_picklecffilzmasqlparse

_compressioncgimailboxsre_compile

_contextvarscgitbmailcapsre_constants

_csvcharset_normalizermarkupsafesre_parse

_ctypeschunkmarshalssl

_ctypes_testclickmathstarlette

_datetimeclick_didyoumeanmatplotlibstat

_decimalclick_pluginsmimetypesstatistics

_dummy_threadclick_replmmapstring

_elementtreecmathmodulefinderstringprep

_functoolscmdmsilibstruct

_hashlibcodemsvcrtsubprocess

_heapqcodecsmultiprocessingsunau

_impcodeopnaclsymbol

_iocollectionsnetrcsymtable

_jsoncoloramanntplibsys

_localecolorsysntsysconfig

_lsprofcompileallntpathtabnanny

_lzmaconcurrentnturl2pathtarfile

_markupbaseconfigparsernumberstelnetlib

_md5contextlibnumpytempfile

_msicontextvarsopcodetest

_multibytecodeccontourpyoperatortextwrap

_multiprocessingcopyoptparsetftpy

_opcodecopyregordered_setthis

_operatorcryptordlookupthreading

_osx_supportcryptographyostime

_overlappedcsvoutcometimeit

_picklectypespackagingtkinter

_py_abccursesparamikotoken

_pydecimalcv2parsertokenize

_pyinstaller_hooks_contribcyclerpasttortoise

_pyiodatabasespathlibtrace

_queuedataclassespdbtraceback

_randomdatetimepefiletracemalloc

_ruamel_yamldateutilpeutilstrio

_sha1dbmpickletrio_websocket

_sha256decimalpickletoolstty

_sha3deepdiffpipturtle

_sha512difflibpipesturtledemo

_signaldispkg_resourcestypes

_sitebuiltinsdistlibpkgutiltyping

_socketdistutilsplatformtyping_extensions

_sqlite3djangoplatformdirstzdata

_sredoctestplistlibunicodedata

_ssldotenvpoplibunittest

_statdummy_threadingposixpathurllib

_statisticseasy_installpprinturllib3

_stringemailprettytableuu

_strptimeencodingsprofileuuid

_structensurepipprompt_toolkituvicorn

_symtableenumpstatsvenv

_testbuffererrnopsutilvine

_testcapifastapiptyvirtualenv

_testconsolefaulthandlerpy_compilewarnings

_testimportmultiplefilecmppyclbrwatchfiles

_testmultiphasefileinputpycparserwave

_threadfilelockpydanticwcwidth

_threading_localfnmatchpydocweakref

_tkinterfontToolspydoc_datawebbrowser

_tracemallocformatterpyechartswebsockets

_warningsfractionspyexpatwin32_setctime

_weakrefftplibpylabwin32ctypes

_weakrefsetfunctoolspyparsingwinreg

_winapifuturepyqt5_pluginswinsound

_xxsubinterpretersgcpyqt5_toolswsgiref

_yamlgenericpathpytzwsproto

abcgetoptqt5_applicationsxdrlib

aifcgetpassqt5_toolsxlrd

altgraphgettextqueuexlwt

amqpglobquoprixml

antigravitygreenletrandomxmlrpc

anyiogziprexxsubtype

argparseh21reprlibyaml

arrayhashlibrequestszipapp

asgirefheapqrlcompleterzipfile

asthmacrunpyzipimport

async_generatorhtmlschedzlib

asynchathttpsecrets

asynciohttptoolsselect

asyncoreidlelibselectors

Enteranymodulenametogetmorehelp.Or,typemodulesspamtosearch

formoduleswhosenameorsummarycontainthestringspam.

help

从这里可以看出还是有相当多的模块,比如我们常用的re,xlrd当然也有我们后期安装的;挑一个进去看看,有啥风景,就挑xlrd

helpxlrd

Helponpackagexlrd:

xlrd

DESCRIPTION

#Copyright(c)2005-2012StephenJohnMachin,LingfoPtyLtd

#Thismoduleispartofthexlrdpackage,whichisreleasedundera

#BSD-stylelicence.

PACKAGECONTENTS

biffh

book

compdoc

formatting

formula

info

sheet

timemachine

xldate

FUNCTIONS

count_records(filename,outfile=colorama.ansitowin32.StreamWrapperobjectat0x000001D26AC13D00)

Fordebuggingandanalysis:summarisethefilesBIFFrecords.

ie:produceasortedfileof``(record_name,count)``.

:paramfilename:Thepathtothefiletobesummarised.

:paramoutfile:Anopenfile,towhichthesummaryiswritten.

--More--行数:

这里面会详细介绍xlrd模块的名字,描述,模块目录、功能、版本、文件位置等信息,在最后一行看到--More--,这是一个分页符,表示当前页面不能全部显示所有信息,需要部分分页操作,可以使用空格键切换下一页,也可以使用回车键看下一行,看你自己的需求进行操作,如果不想看了可输入q退出阅读模式,进入help模式,再输入q则可以继续退出help模式;

helpq

YouarenowleavinghelpandreturningtothePythoninterpreter.

Ifyouwanttoaskforhelponaparticularobjectdirectlyfromthe

interpreter,youcantypehelp(object).Executinghelp(string)

hasthesameeffectastyping

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论