广告
返回顶部
首页 > 资讯 > 后端开发 > Python >python自带help功能怎么使用
  • 271
分享到

python自带help功能怎么使用

2023-07-05 16:07:28 271人浏览 泡泡鱼

Python 官方文档:入门教程 => 点击学习

摘要

这篇“python自带help功能怎么使用”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Python自带help功能怎么使用

这篇“python自带help功能怎么使用”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“Python自带help功能怎么使用”文章吧。

python help使用

C:\Users\wusong>pythonPython 3.8.2rc1 (tags/v3.8.2rc1:8623e68, Feb 11 2020, 10:46:21) [MSC v.1916 64 bit (AMD64)] on win32Type "help", "copyright", "credits" or "license" for more infORMation.>>>

输入help()

>>> helpType help() for interactive help, or help(object) for help about object.>>> help()Welcome to Python 3.8's help utility!If this is your first time using Python, you should definitely check outthe tutorial on the Internet at https://docs.python.org/3.8/tutorial/.Enter the name of any module, keyWord, or topic to get help on writingPython programs and using Python modules.  To quit this help utility andreturn to the interpreter, just type "quit".To get a list of available modules, keywords, symbols, or topics, type"modules", "keywords", "symbols", or "topics".  Each module also comeswith a one-line summary of what it does; to list the modules whose nameor summary contain a given string such as "spam", type "modules spam".help>

这句话:To get a list of available modules, keywords, symbols, or topics, type "modules", "keywords", "symbols", or "topics".

意思就是:

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

modules

我们先看下modules

在help模式下输入:modules

help> modulesPlease wait a moment while I gather a list of all available modules...D:\software_install\python\lib\pkgutil.py:92: UserWarning: The numpy.array_api submodule is still experimental. See NEP 47.  __import__(info.name)PIL                 asyncpg             idna                seleniumPyInstaller         atexit              imaplib             serialPyQt5               atlastk             imghdr              setuptools__future__          attr                imp                 shelve_abc                attrs               importlib           shlex_ast                audioop             inspect             shutil_asyncio            backports           io                  signal_bisect             base64              ipaddress           simpleJSON_blake2             bcrypt              itertools           site_bootlocale         bdb                 jinja2              six_bz2                billiard            json                smtpd_cffi_backend       binascii            keyword             smtplib_codecs             binhex              kiwisolver          sndhdr_codecs_cn          bisect              kombu               sniffio_codecs_hk          broadcaster         lib2to3             Socket_codecs_iso2022     builtins            libfuturize         socketserver_codecs_jp          bz2                 libpasteurize       socks_codecs_kr          cProfile            linecache           sockshandler_codecs_tw          calendar            locale              sortedcontainers_collections        celery              logging             sqlalchemy_collections_abc    certifi             loguru              sqlite3_compat_pickle      cffi                lzma                sqlparse_compression        cgi                 mailbox             sre_compile_contextvars        cgitb               mailcap             sre_constants_csv                charset_normalizer  markupsafe          sre_parse_ctypes             chunk               marshal             ssl_ctypes_test        click               math                starlette_datetime           click_didyoumean    matplotlib          stat_decimal            click_plugins       mimetypes           statistics_dummy_thread       click_repl          mmap                string_elementtree        cmath               modulefinder        stringprep_functools          cmd                 msilib              struct_hashlib            code                msvcrt              subprocess_heapq              codecs              multiprocessing     sunau_imp                codeop              nacl                symbol_io                 collections         netrc               symtable_json               colorama            nntplib             sys_locale             colorsys            nt                  sysconfig_lsprof             compileall          ntpath              tabnanny_lzma               concurrent          nturl2path          tarfile_markupbase         configparser        numbers             telnetlib_md5                contextlib          numpy               tempfile_msi                contextvars         opcode              test_multibytecodec     contourpy           operator            textwrap_multiprocessing    copy                optparse            tftpy_opcode             copyreg             ordered_set         this_operator           crypt               ordlookup           threading_osx_support        cryptography        os                  time_overlapped         csv                 outcome             timeit_pickle             ctypes              packaging           tkinter_py_abc             curses              paramiko            token_pydecimal          cv2                 parser              tokenize_pyinstaller_hooks_contrib cycler              past                tortoise_pyio               databases           pathlib             trace_queue              dataclasses         pdb                 traceback_random             datetime            pefile              tracemalloc_ruamel_yaml        dateutil            peutils             trio_sha1               dbm                 pickle              trio_websocket_sha256             decimal             pickletools         tty_sha3               deepdiff            pip                 turtle_sha512             difflib             pipes               turtledemo_signal             dis                 pkg_resources       types_sitebuiltins       distlib             pkgutil             typing_socket             distutils           platform            typing_extensions_sqlite3            Django              platformdirs        tzdata_sre                doctest             plistlib            unicodedata_ssl                dotenv              poplib              unittest_stat               dummy_threading     posixpath           urllib_statistics         easy_install        pprint              urllib3_string             email               prettytable         uu_strptime           encodings           profile             uuid_struct             ensurepip           prompt_toolkit      uvicorn_symtable           enum                pstats              venv_testbuffer         errno               psutil              vine_testcapi           fastapi             pty                 virtualenv_testconsole        faulthandler        py_compile          warnings_testimportmultiple filecmp             pyclbr              watchfiles_testmultiphase     fileinput           pycparser           wave_thread             filelock            pydantic            wcwidth_threading_local    fnmatch             pydoc               weakref_tkinter            fontTools           pydoc_data          WEBbrowser_tracemalloc        formatter           pyecharts           websockets_warnings           fractions           pyexpat             win32_setctime_weakref            ftplib              pylab               win32ctypes_weakrefset         functools           pyparsing           winreg_winapi             future              pyqt5_plugins       winsound_xxsubinterpreters  GC                  pyqt5_tools         wsgiref_yaml               genericpath         pytz                wsprotoabc                 getopt              qt5_applications    xdrlibaifc                getpass             qt5_tools           xlrdaltgraph            gettext             queue               xlwtaMQp                glob                quopri              xmlantigravity         greenlet            random              xmlrpcanyio               gzip                re                  xxsubtypeargparse            h21                 reprlib             yamlarray               hashlib             requests            zipappasgiref             heapq               rlcompleter         zipfileast                 hMac                runpy               zipimportasync_generator     html                sched               zlibasynchat            Http                secretsasyncio             httptools           selectasyncore            idlelib             selectorsEnter any module name to get more help.  Or, type "modules spam" to searchfor modules whose name or summary contain the string "spam".help>

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

help> xlrdHelp on package xlrd:NAME    xlrdDESCRIPTION    # Copyright (c) 2005-2012 Stephen John Machin, Lingfo Pty Ltd    # This module is part of the xlrd package, which is released under a    # BSD-style licence.PACKAGE CONTENTS    biffh    book    compdoc    formatting    formula    info    sheet    timemachine    xldateFUNCTIONS    count_records(filename, outfile=<colorama.ansitowin32.StreamWrapper object at 0x000001D26AC13D00>)        For debugging and analysis: summarise the file's BIFF records.        ie: produce a sorted file of ``(record_name, count)``.        :param filename: The path to the file to be summarised.        :param outfile: An open file, to which the summary is written.-- More  -- 行数:

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

help> qYou are now leaving help and returning to the Python interpreter.If you want to ask for help on a particular object directly from theinterpreter, you can type "help(object)".  Executing "help('string')"has the same effect as typing a particular string at the help> prompt.>>>

keywords

再看下我们后面会常说的关键字

help> keywordsHere is a list of the Python keywords.  Enter any keyword to get more help.False               class               from                orNone                continue            global              passTrue                def                 if                  raiseand                 del                 import              returnas                  elif                in                  tryassert              else                is                  whileasync               except              lambda              withawait               finally             nonlocal            yieldbreak               for                 not

symbols

这个是罗列了我们在python语言中涉及的运算符

help> symbolsHere is a list of the punctuation symbols which Python assigns special meaningto. Enter any symbol to get more help.!=                  +                   <=                  __"                   +=                  <>                  `"""                 ,                   ==                  b"%                   -                   >                   b'%=                  -=                  >=                  f"&                   .                   >>                  f'&=                  ...                 >>=                 j'                   /                   @                   r"'''                 //                  J                   r'(                   //=                 [                   u")                   /=                  \                   u'*                   :                   ]                   |**                  <                   ^                   |=**=                 <<                  ^=                  ~*=                  <<=                 _

以上就是关于“python自带help功能怎么使用”这篇文章的内容,相信大家都有了一定的了解,希望小编分享的内容对大家有帮助,若想了解更多相关的知识内容,请关注编程网Python频道。

--结束END--

本文标题: python自带help功能怎么使用

本文链接: https://www.lsjlt.com/news/353303.html(转载时请注明来源链接)

有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

本篇文章演示代码以及资料文档资料下载

下载Word文档到电脑,方便收藏和打印~

下载Word文档
猜你喜欢
  • python自带help功能怎么使用
    这篇“python自带help功能怎么使用”文章的知识点大部分人都不太理解,所以小编给大家总结了以下内容,内容详细,步骤清晰,具有一定的借鉴价值,希望大家阅读完这篇文章能有所收获,下面我们一起来看看这篇“python自带help功能怎么使用...
    99+
    2023-07-05
  • python入门学习之自带help功能初步使用示例
    目录python help使用moduleskeywordssymbolspython help使用 C:\Users\wusong>python Python 3.8.2r...
    99+
    2023-03-24
    python自带help功能 python help
  • windows自带录屏功能怎么使用
    Windows自带的录屏功能是通过“Xbox Game Bar”实现的,以下是使用步骤:1. 打开你想要录制的应用或游戏。2. 同时...
    99+
    2023-09-11
    windows
  • 怎么使用Python的help语法
    这篇文章主要讲解了“怎么使用Python的help语法”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么使用Python的help语法”吧!一、注释确保对模块, 函数, 方法和行内注释使用正...
    99+
    2023-06-02
  • win10自带格式转换功能怎么使用
    在Windows 10中,自带了一款名为“媒体功能包”的应用程序,其中包含了格式转换的功能。您可以按照以下步骤使用它:1. 打开“媒...
    99+
    2023-09-07
    win10
  • springboot2怎么禁用自带tomcat的session功能
    这篇文章主要介绍“springboot2怎么禁用自带tomcat的session功能”,在日常操作中,相信很多人在springboot2怎么禁用自带tomcat的session功能问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法...
    99+
    2023-06-25
  • win10怎么关闭自带杀毒功能
    本篇内容主要讲解“win10怎么关闭自带杀毒功能”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“win10怎么关闭自带杀毒功能”吧!关闭方法:win+R打开运行,然后输入gpedit.msc,点击...
    99+
    2023-06-28
  • Win8.1系统自带的“定位设置”功能怎么使用?
    Windows8.1系统自带“定位设置”功能,如果启用了定位设置功能,我们计算机的Windows系统就会定期将GPS(全球定位系统)和其他位置信息发送到Microsoft,这就难免泄...
    99+
    2022-06-04
    系统自带 功能
  • 怎么使用win10自带功能修复0字节u盘
    本篇内容介绍了“怎么使用win10自带功能修复0字节u盘”的有关知识,在实际案例的操作过程中,不少人都会遇到这样的困境,接下来就让小编带领大家学习一下如何处理这些情况吧!希望大家仔细阅读,能够学有所成!登录win10系统桌面,右键开始菜单,...
    99+
    2023-06-28
  • 怎样使用自带功能轻松优化Win XP
    首先从系统本身入手,要使系统运行流畅,首先要保证系统分区(通常是C盘)有足够的空间,能不装C盘的绝不装C盘,这也是保护资料的一种手段。另外,合理设置虚拟内存和关闭系统还原可以减小C盘空间的占用。 同时,开启自动更新的朋...
    99+
    2023-05-25
    Win XP 优化 功能 自带
  • win11自带投屏功能如何使用
    Windows 11自带投屏功能,可以将您的屏幕内容投射到其他设备上,如电视或投影仪。以下是使用Windows 11投屏功能的步骤:...
    99+
    2023-10-18
    win11
  • Win10如何使用自带录屏功能
    这篇文章主要介绍了Win10如何使用自带录屏功能,具有一定借鉴价值,感兴趣的朋友可以参考下,希望大家阅读完这篇文章之后大有收获,下面让小编带着大家一起了解一下。任意录屏界面,同时按下WIN+G组合键,注意在空白桌面按组合键是无效的。(即需录...
    99+
    2023-06-27
  • win11自带解压功能如何使用
    这篇文章主要介绍“win11自带解压功能如何使用”,在日常操作中,相信很多人在win11自带解压功能如何使用问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”win11自带解压功能如何使用”的疑惑有所帮助!接下来...
    99+
    2023-06-30
  • win10自带录屏功能如何使用
    在Windows 10中,可以使用内置的录屏功能来录制屏幕。以下是使用Win10自带录屏功能的步骤:1. 打开“开始”菜单,然后点击...
    99+
    2023-08-20
    win10
  • Win8.1自带分区功能的使用方法 win8.1使用自带分区功能如何进行分区
    大家是否知道Win8.1自带分区功能,那么Win8.1自带分区功能如何使用?安装win8.1正式版系统后需要进行分区,可能很多用户第一反应就是下载分区功能。其实win8.1系统自带有分区功能,完全可以使用自...
    99+
    2022-06-04
    分区 自带 功能
  • Win8怎么用自带的GeoLocation地理定位功能?
    现在很多手机应用都有地理定位功能,能够准确定位,搜索目的地。其实在Win8系统中也有地理定位功能,叫做GeoLocation。相 操作步骤: 1、 使用组合热键“Win+X”调出快捷菜单,点击并打...
    99+
    2023-05-20
    Win8 GeoLocation
  • wordpress自带的缓存功能使用介绍
    用静态化当然可以解决这些问题,不过对于流量不大的博客就没必要了。 wordpress自带有缓存体系,关键的函数你可以在wp-includes/cache.php或 Codex里查找到所有的函数。 你可以使用下列函数来实现...
    99+
    2022-06-12
    wordpress缓存 wp_cache
  • win7系统Excel自带修复功能怎么用?win7使用Excel的修复功能方法
    办公族用户常需使用Excel软件,编辑或保存数据资料,但在win7纯净版系统打开或使用Excel文件中难免会遇到文件损坏的问题,如果Excel文件中有重要数据,那么这时候该怎么办呢?Excel拥有人性化的设计,为避免发生...
    99+
    2023-05-20
    win7 Excel 修复
  • 怎么使用Java自带的mail API实现邮件发送功能
    本篇内容主要讲解“怎么使用Java自带的mail API实现邮件发送功能”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“怎么使用Java自带的mail API实现邮件发送功能”...
    99+
    2023-07-05
  • 怎么使用Python功能
    这篇文章主要讲解了“怎么使用Python功能”,文中的讲解内容简单清晰,易于学习与理解,下面请大家跟着小编的思路慢慢深入,一起来研究和学习“怎么使用Python功能”吧!变量赋值正如函数*args和**kwargs,在变量赋值中可以运用相同...
    99+
    2023-06-16
软考高级职称资格查询
编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
  • 官方手机版

  • 微信公众号

  • 商务合作