简体   繁体   English

Python 解释器中的自动完成和函数定义

[英]Autocompletion and function definition in Python Interpreter

See the below GIF看下面的动图关联

How does the documentation for all the functions appear as you type in the terminal?当您在终端中键入时,所有功能的文档如何显示?

I am already familiar with autocompletion and there are bunch to tutorials to do this but what about function definition?我已经熟悉自动完成,并且有很多教程可以做到这一点,但是函数定义呢? Currently I am using pip install ptpython module to get autocompletion feature but I want to know the function definition as well.目前我正在使用pip install ptpython模块来获得自动完成功能,但我也想知道函数定义。 Could anyone help me?谁能帮帮我?

Got my answer from @Padraic Cunningham.从@Padraic Cunningham 那里得到了我的回答。 See the comment section.见评论区。

This is a bpython shell.这是一个 bpython shell。 You can download using pip or apt-get install bpython您可以使用pipapt-get install bpython

pip install bpython
sudo apt-get install bpython

To start go to your terminal and type bpython开始去你的终端并输入bpython

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM