1Metadata-Version: 2.1 2Name: bpython 3Version: 0.22.1 4Summary: UNKNOWN 5Home-page: https://www.bpython-interpreter.org/ 6Author: Bob Farrell, Andreas Stuehrk, Sebastian Ramacher, Thomas Ballinger, et al. 7Author-email: robertanthonyfarrell@gmail.com 8License: MIT 9Project-URL: GitHub, https://github.com/bpython/bpython 10Project-URL: Documentation, https://doc.bpython-interpreter.org 11Description: .. image:: https://img.shields.io/pypi/v/bpython 12 :target: https://pypi.org/project/bpython 13 14 .. image:: https://readthedocs.org/projects/bpython/badge/?version=latest 15 :target: https://docs.bpython-interpreter.org/en/latest/ 16 17 .. image:: https://img.shields.io/badge/code%20style-black-000000.svg 18 :target: https://github.com/ambv/black 19 20 21 *********************************************************************** 22 bpython: A fancy curses interface to the Python interactive interpreter 23 *********************************************************************** 24 25 `bpython`_ is a lightweight Python interpreter that adds several features common 26 to IDEs. These features include **syntax highlighting**, **expected parameter 27 list**, **auto-indentation**, and **autocompletion**. (See below for example 28 usage). 29 30 .. image:: https://bpython-interpreter.org/images/math.gif 31 :alt: bpython 32 :width: 566 33 :height: 348 34 :align: center 35 36 bpython does **not** aim to be a complete IDE - the focus is on implementing a 37 few ideas in a practical, useful, and lightweight manner. 38 39 bpython is a great replacement to any occasion where you would normally use the 40 vanilla Python interpreter - testing out solutions to people's problems on IRC, 41 quickly testing a method of doing something without creating a temporary file, 42 etc. 43 44 You can find more about bpython - including `full documentation`_ - at our 45 `homepage`_. 46 47 ========================== 48 Installation & Basic Usage 49 ========================== 50 51 Installation using Pip 52 ---------------------- 53 54 If you have `pip`_ installed, you can simply run: 55 56 .. code-block:: bash 57 58 $ pip install bpython 59 60 Start bpython by typing ``bpython`` in your terminal. You can exit bpython by 61 using the ``exit()`` command or by pressing control-D like regular interactive 62 Python. 63 64 Installation via OS Package Manager 65 ----------------------------------- 66 67 The majority of desktop computer operating systems come with package management 68 systems. If you use one of these OSes, you can install ``bpython`` using the 69 package manager. 70 71 Ubuntu/Debian 72 ~~~~~~~~~~~~~ 73 Ubuntu/Debian family Linux users can install ``bpython`` using the ``apt`` 74 package manager, using the command with ``sudo`` privileges: 75 76 .. code-block:: bash 77 78 $ apt install bpython 79 80 In case you are using an older version, run 81 82 .. code-block:: bash 83 84 $ apt-get install bpython 85 86 Arch Linux 87 ~~~~~~~~~~ 88 Arch Linux uses ``pacman`` as the default package manager; you can use it to install ``bpython``: 89 90 .. code-block:: bash 91 92 $ pacman -S bpython 93 94 Fedora 95 ~~~~~~~~~~ 96 Fedora users can install ``bpython`` directly from the command line using ``dnf``. 97 98 .. code-block:: bash 99 100 $ dnf install bpython 101 102 Windows 103 ~~~~~~~ 104 **Caveats:** As ``bpython`` makes use of the ncurses library of \*nix-family operating systems, 105 bpython on Windows is not officially supported and tested. 106 107 However, you may still use bpython on Windows using a workaround. In brief, you should install 108 these two packages using ``pip``: 109 110 .. code-block:: bash 111 112 $ pip install bpython windows-curses 113 114 Then you should invoke a program called ``bpython-curses.exe`` instead of ``bpython.exe`` to use bpython: 115 116 .. code-block:: bash 117 118 $ bpython-curses 119 120 Mac OS 121 ~~~~~~ 122 Like Windows, Mac OS does not include a package manager by default. If you have installed any 123 third-party package manager like MacPorts, you can install it via 124 125 .. code-block:: bash 126 127 $ sudo port install py-bpython 128 129 =================== 130 Features & Examples 131 =================== 132 * Readline-like autocomplete, with suggestions displayed as you type. 133 134 * In-line syntax highlighting. This uses Pygments for lexing the code as you 135 type, and colours appropriately. 136 137 * Expected parameter list. As in a lot of modern IDEs, bpython will attempt to 138 display a list of parameters for any function you call. The inspect module (which 139 works with any Python function) is tried first, and then pydoc if that fails. 140 141 * Rewind. This isn't called "Undo" because it would be misleading, but "Rewind" 142 is probably as bad. The idea is that the code entered is kept in memory and 143 when the Rewind function is called, the last line is popped and the entire 144 session is re-evaluated. Use <control-R> to rewind. 145 146 * Edit the current line or your entire session in an editor. F7 opens the current 147 session in a text editor, and if modifications are made, the session is rerun 148 with these changes. 149 150 * Pastebin code/write to file. Use the <F8> key to upload the screen's contents 151 to pastebin, with a URL returned. 152 153 * Reload imported Python modules. Use <F6> to clear sys.modules and rerun your 154 session to test changes to code in a module you're working on. 155 156 ============= 157 Configuration 158 ============= 159 See the sample-config file for a list of available options. You should save 160 your config file as **~/.config/bpython/config** (i.e. 161 ``$XDG_CONFIG_HOME/bpython/config``) or specify at the command line:: 162 163 bpython --config /path/to/bpython/config 164 165 ============ 166 Dependencies 167 ============ 168 * Pygments 169 * curtsies >= 0.3.5 170 * greenlet 171 * pyxdg 172 * requests 173 * Sphinx >= 1.5 (optional, for the documentation) 174 * babel (optional, for internationalization) 175 * jedi (optional, for experimental multiline completion) 176 * watchdog (optional, for monitoring imported modules for changes) 177 * pyperclip (optional, for copying to the clipboard) 178 179 bpython-urwid 180 ------------- 181 ``bpython-urwid`` requires the following additional packages: 182 183 * urwid 184 185 ========== 186 Known Bugs 187 ========== 188 For known bugs please see bpython's `known issues and FAQ`_ page. 189 190 ====================== 191 Contact & Contributing 192 ====================== 193 I hope you find it useful and please feel free to submit any bugs/patches 194 suggestions to `Robert`_ or place them on the GitHub 195 `issues tracker`_. 196 197 For any other ways of communicating with bpython users and devs you can find us 198 at the community page on the `project homepage`_, or in the `community`_. 199 200 Hope to see you there! 201 202 =================== 203 CLI Windows Support 204 =================== 205 206 Dependencies 207 ------------ 208 `Curses`_ Use the appropriate version compiled by Christoph Gohlke. 209 210 `pyreadline`_ Use the version in the cheeseshop. 211 212 Recommended 213 ----------- 214 Obtain the less program from GnuUtils. This makes the pager work as intended. 215 It can be obtained from cygwin or GnuWin32 or msys 216 217 Current version is tested with 218 ------------------------------ 219 * Curses 2.2 220 * pyreadline 1.7 221 222 Curses Notes 223 ------------ 224 The curses used has a bug where the colours are displayed incorrectly: 225 226 * red is swapped with blue 227 * cyan is swapped with yellow 228 229 To correct this I have provided a windows.theme file. 230 231 This curses implementation has 16 colors (dark and light versions of the 232 colours) 233 234 235 ============ 236 Alternatives 237 ============ 238 239 `ptpython`_ 240 241 `IPython`_ 242 243 Feel free to get in touch if you know of any other alternatives that people 244 may be interested to try. 245 246 .. _ptpython: https://github.com/jonathanslenders/ptpython 247 .. _ipython: https://ipython.org/ 248 .. _homepage: http://www.bpython-interpreter.org 249 .. _full documentation: http://docs.bpython-interpreter.org/ 250 .. _issues tracker: http://github.com/bpython/bpython/issues/ 251 .. _pip: https://pip.pypa.io/en/latest/index.html 252 .. _project homepage: http://bpython-interpreter.org 253 .. _community: http://docs.bpython-interpreter.org/community.html 254 .. _Robert: robertanthonyfarrell@gmail.com 255 .. _bpython: http://www.bpython-interpreter.org/ 256 .. _Curses: http://www.lfd.uci.edu/~gohlke/pythonlibs/ 257 .. _pyreadline: http://pypi.python.org/pypi/pyreadline/ 258 .. _known issues and FAQ: http://bpython-interpreter.org/known-issues-and-faq.html 259 260Platform: UNKNOWN 261Classifier: Programming Language :: Python :: 3 262Requires-Python: >=3.6 263Provides-Extra: clipboard 264Provides-Extra: jedi 265Provides-Extra: urwid 266Provides-Extra: watch 267