BPYTHON(1)

πŸ“¦
version 0.24 Β· 2 versions
, in debian bookworm, ubuntu noble

πŸ’– BPYTHON(1) πŸ’–

okay bestie, sit DOWN, because this is the manual page for bpython β€” version 0.24"" β€” and it's lowkey iconic. it's a fancy interface to the Python interactive interpreter, and by fancy I mean it comes in three flavors: curtsies, curses, and urwid. pick your fighter. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

three whole ways to summon it, no cap:

bpython [options] [file [args]]
bpython-curses [options] [file [args]]
bpython-urwid [options] [file [args]]

🌸 DESCRIPTION 🌸

so the whole ~vision~ here? give you every feature in-line, like a modern IDE does, except it's a simple, lightweight little package that just vibes in your terminal window. no bloat. no drama. just you and your REPL. πŸ’…

here's the rundown, one feature at a time:

  • In-line syntax highlighting. it highlights your commands as you type them. literally as you type. main character behavior honestly. πŸ”₯
  • Readline-like autocomplete with suggestions displayed as you type. press tab to complete expressions when there's only one suggestion. one suggestion = auto-slide into the completion. 🫢
  • Expected parameter list. this one's so helpful β€” it displays a list of parameters for any function you call. it uses the inspect module first, then tries pydoc. teamwork makes the dream work.
  • Rewind. okay so the name is a bit misleading, ngl, but here's the tea: code that's been entered is remembered, and when you Rewind, it pops the last line and re-evaluates the entire code. ⚠️ this is error-prone, bestie β€” it's mostly useful for defining classes and functions, so don't go wild with it.
  • Pastebin code/write to file. this posts the current buffer to a pastebin (that's bpaste.net) or writes it out to a file. sharing is caring. πŸ’–
  • Flush curses screen to stdout. and this is the part that makes bpython different from other curses apps: when you quit, bpython dumps the screen data to stdout, so you actually see what you've done in the buffer of your terminal. iconic. no notes. πŸ‘‘

✨ OPTIONS ✨

the long and short forms of options, shown here as alternatives, are equivalent. and heads up β€” if bpython sees an argument it does not know, execution falls back to the regular Python interpreter. so it's forgiving like that. πŸ’œ

🌈 supported by ALL frontends 🌈

  • --config=<config> β€” use <config> instead of the default config file. your config, your rules.
  • -h, --help β€” show the help message and exit. the classic.
  • -i, --interactive β€” drop to a bpython shell after running file instead of exiting. oh and heads up, the PYTHONSTARTUP file is not read when you do this.
  • -q, --quiet β€” do not flush the output to stdout. shhh. 🀫
  • -V, --version β€” print bpython's version and exit.
  • -l <level>, --log-level=<level> β€” set logging level.
  • -L <file>, --log-output=<file> β€” set log output file.

πŸŽ€ and ALSO these πŸŽ€

  • -p file, --paste=file β€” paste in the contents of a file at startup. yes the flag is -p here, don't get it twisted, we'll get to why in a sec.

πŸ¦„ bpython-urwid exclusives (only if Twisted is available) πŸ¦„

in addition to the common options, bpython-urwid also supports the following options β€” but only if Twisted is available:

  • -r <reactor>, --reactor=<reactor> β€” use Twisted's <reactor> instead of urwid's event loop.
  • --help-reactors β€” display a list of available Twisted reactors. (no short form, she stands alone πŸ’…)
  • -p <plugin>, --plugin=<plugin> β€” execute a twistd plugin. use twistd to get a list of available plugins. and use -- to pass options to the plugin. (see?? -p means paste over in common-land and plugin here. context is everything.)
  • -s <port>, --server=<port> β€” run an eval server on port <port>. ⚠️ this option forces the use of a Twisted reactor. no takebacks.

⌨️ KEYS ⌨️

bpython's keys are fully configurable, periodt. go peek at http://docs.bpython-interpreter.org/configuration.html#keyboard for the deets. 🧚


πŸ“ FILES πŸ“

  • $XDG_CONFIG_HOME/bpython/config β€” your bpython config. see sample-config (it lives in /usr/share/doc/bpython/examples on Debian) for the various options you can use, or just read bpython-config(5). iykyk.

πŸ’€ KNOWN BUGS πŸ’€

see http://github.com/bpython/bpython/issues/ for a list of known issues. it's giving transparency. πŸ™ˆ


πŸ‘‘ SEE ALSO πŸ‘‘

bpython-config(5), python(1)


🌟 AUTHOR 🌟

bpython was written by Robert Anthony Farrell <robertanthonyfarrel@gmail.com> and his bunch of loyal followers. (a whole squad, fr fr.)

this manual page was written by JΓΈrgen Pedersen TjernΓΈ <jorgen@devsoft.no>, for the Debian project (but may be used by others β€” sharing is literally caring).


2008-2023 Bob Farrell, Andreas Stuehrk, Sebastian Ramacher, Thomas Ballinger, et al.


and that's the whole page, bestie!! πŸŽ€ this manual page is from Jan 18, 2023, documenting version 0.24"" of bpython. go forth and REPL in style. slay. πŸ’–βœ¨πŸ¦‹πŸŒΈπŸ’…πŸ«ΆπŸ‘‘

πŸ“¦ where this page comes from