Powerful Python Shell

Source: Internet
Author: User
Bpython is a good Python interpreter interface. This article will take you to understand bpython. Interested friends can refer to Python as a very practical and popular interpreted programming language, one of its advantages is that it can use its interactive shell for exploratory programming. You can try to enter some code and get feedback from the interpreter immediately without writing a script. However, the shell that comes with Python also has some limitations, such as the inability to automatically complete, and the inability to highlight the syntax.

Fortunately, the powerful Python has extended the default shell and developed many beautiful Python shells. Each provides an excellent interactive Python experience. Today, I will introduce you to bpython, a better one.

Bpython Introduction

Bpython is a good Python interpreter interface. The developer's goal is to provide users with all the built-in functions, much like the current IDE (integrated development environment ), however, these functions are encapsulated in a simple and lightweight package and can be run in the terminal window.

Bpython does not want to create anything new or groundbreaking. On the contrary, it brings together some concise ideas, focusing on practicality and operability.

How to install

The latest version of bpython is 0.15. There are four installation methods:

  • Download the latest version of tarball: http://bpython-interpreter.org/releases/
  • Clone the Git repository of bpython: git clone https://github.com/bpython/bpython/
  • Use pip to install: pip install bpython
  • Use the built-in package manager: apt-get install bpython

To make bpython run properly, you also need to install the following dependency packages:

Pygments requests curtsies> = 0.1.18, <0.2 greenlet urwid (for bpython-urwid only)

Functions

Rich functions, including:

  • Built-in syntax highlighting-use Pygments to typeset the code you typed and use appropriate colors
  • Show auto-completion suggestions based on your behavior
  • List expected parameters for any Python function-a list of parameters of any function you call is displayed.
  • The "Rewind" function calls up the last line of code in the memory and re-executes it.
  • You can send the entered code to pastebin.
  • You can save the entered code to a file.
  • Auto indent
  • Support for Python 3

Similar Python shell

In addition to bpython, there are three similar Python shells, namely IPython, ptpython, and dreampie.

I know what bpython is, how to install it, and its functions. I hope you can learn more about it.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.