Package: bpython
bpython: A fancy interface to the Python interactive interpreterbpythonis a lightweight Python interpreter that adds several features common
to IDEs. These features includesyntax highlighting,expected parameter
list,auto-indentation, andautocompletion. (See below for example
usage).bpython doesnotaim to be a complete IDE - the focus is on implementing a
few ideas in a practical, useful, and lightweight manner.bpython is a great replacement to any occasion where you would normally use the
vanilla Python interpreter - testing out solutions to people’s problems on IRC,
quickly testing a method of doing something without creating a temporary file,
etc.You can find more about bpython - includingfull documentation- at ourhomepage.Installation & Basic UsageInstallation using PipIf you havepipinstalled, you can simply run:$pipinstallbpythonStart bpython by typingbpythonin your terminal. You can exit bpython by
using theexit()command or by pressing control-D like regular interactive
Python.Features & ExamplesReadline-like autocomplete, with suggestions displayed as you type.In-line syntax highlighting.  This uses Pygments for lexing the code as you
type, and colours appropriately.Expected parameter list.  As in a lot of modern IDEs, bpython will attempt to
display a list of parameters for any function you call. The inspect module (which
works with any Python function) is tried first, and then pydoc if that fails.Rewind.  This isn’t called “Undo” because it would be misleading, but “Rewind”
is probably as bad. The idea is that the code entered is kept in memory and
when the Rewind function is called, the last line is popped and the entire
session is re-evaluated.  Use <control-R> to rewind.Edit the current line or your entire session in an editor. F7 opens the current
session in a text editor, and if modifications are made, the session is rerun
with these changes.Pastebin code/write to file.  Use the <F8> key to upload the screen’s contents
to pastebin, with a URL returned.Reload imported Python modules.  Use <F6> to clear sys.modules and rerun your
session to test changes to code in a module you’re working on.ConfigurationSee the sample-config file for a list of available options.  You should save
your config file as~/.config/bpython/config(i.e.$XDG_CONFIG_HOME/bpython/config) or specify at the command line:bpython --config /path/to/bpython/configDependenciesPygmentscurtsies >= 0.4.0greenletpyxdgrequestsSphinx >= 1.5 (optional, for the documentation)babel (optional, for internationalization)jedi (optional, for experimental multiline completion)watchdog (optional, for monitoring imported modules for changes)pyperclip (optional, for copying to the clipboard)bpython-urwidbpython-urwidrequires the following additional packages:urwidInstallation via OS Package ManagerThe majority of desktop computer operating systems come with package management
systems. If you use one of these OSes, you can installbpythonusing the
package manager.Ubuntu/DebianUbuntu/Debian family Linux users can installbpythonusing theaptpackage manager, using the command withsudoprivileges:$aptinstallbpythonIn case you are using an older version, run$apt-getinstallbpythonArch LinuxArch Linux usespacmanas the default package manager; you can use it to installbpython:$pacman-SbpythonFedoraFedora users can installbpythondirectly from the command line usingdnf.$dnfinstallbpythonGNU GuixGuix users can installbpythonon any GNU/Linux distribution directly from the command line:$guixinstallbpythonmacOSmacOS does not include a package manager by default. If you have installed any
third-party package manager like MacPorts, you can install it via$sudoportinstallpy-bpythonKnown BugsFor known bugs please see bpython’sknown issues and FAQpage.Contact & ContributingI hope you find it useful and please feel free to submit any bugs/patches
suggestions toRobertor place them on the GitHubissues tracker.For any other ways of communicating with bpython users and devs you can find us
at the community page on theproject homepage, or in thecommunity.Hope to see you there!