| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 7998473 commit b2e0c4a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,45 +8,34 @@ Pygments | |||
| 8 | 8 | ||
| 9 | 9 | Introduction | |
| 10 | 10 | ============ | |
| 11 | - A few people asked for stuff like syntax highlighting | ||
| 12 | - and autocomplete for the Python interactive interpreter. | ||
| 13 | - IPython seems to offer this (plus you can get readline | ||
| 14 | - behaviour in the vanilla interpreter) but I tried | ||
| 15 | - IPython a couple of times. Perhaps I didn't really get | ||
| 16 | - it, but I get the feeling that the ideas behind IPython | ||
| 17 | - are pretty different to bpython. I didn't want to create | ||
| 18 | - a whole development environment; I simply wanted to | ||
| 19 | - provide a couple of neat features that already exist | ||
| 20 | - and turn them into something a little more interactive. | ||
| 21 | - | ||
| 22 | - The idea is to provide the user with all the features | ||
| 23 | - in-line, much like modern IDEs, but in a simple, | ||
| 24 | - lightweight package that can be run in a terminal | ||
| 25 | - window, so curses seemed like the best choice. | ||
| 26 | - Sorry if you use Windows. | ||
| 27 | - | ||
| 28 | - bpython doesn't attempt to create anything new or | ||
| 29 | - groundbreaking, it simply brings together a few neat | ||
| 30 | - ideas and focuses on practicality and usefulness. | ||
| 31 | - For this reason, the "Rewind" function should be | ||
| 32 | - taken with a pinch of salt, but personally I have | ||
| 33 | - found it to be very useful. I use bpython now | ||
| 34 | - whenever I would normally use the vanilla interpreter, | ||
| 35 | - e.g. for testing out solutions to people's problems | ||
| 36 | - on IRC, quickly testing a method of doing something | ||
| 37 | - without creating a temporary file, etc.. | ||
| 38 | - | ||
| 39 | - I hope you find it useful and please feel free to | ||
| 40 | - submit any bugs/patches (yeah right)/suggestions | ||
| 41 | - to: | ||
| 11 | + A few people asked for stuff like syntax highlighting and autocomplete for the | ||
| 12 | + Python interactive interpreter. IPython seems to offer this (plus you can get | ||
| 13 | + readline behaviour in the vanilla interpreter) but I tried IPython a couple of | ||
| 14 | + times. Perhaps I didn't really get it, but I get the feeling that the ideas | ||
| 15 | + behind IPython are pretty different to bpython. I didn't want to create a whole | ||
| 16 | + development environment; I simply wanted to provide a couple of neat features | ||
| 17 | + that already exist and turn them into something a little more interactive. | ||
| 18 | + | ||
| 19 | + The idea is to provide the user with all the features in-line, much like modern | ||
| 20 | + IDEs, but in a simple, lightweight package that can be run in a terminal | ||
| 21 | + window, so curses seemed like the best choice. Sorry if you use Windows. | ||
| 22 | + | ||
| 23 | + bpython doesn't attempt to create anything new or groundbreaking, it simply | ||
| 24 | + brings together a few neat ideas and focuses on practicality and usefulness. | ||
| 25 | + For this reason, the "Rewind" function should be taken with a pinch of salt, | ||
| 26 | + but personally I have found it to be very useful. I use bpython now whenever I | ||
| 27 | + would normally use the vanilla interpreter, e.g. for testing out solutions to | ||
| 28 | + people's problems on IRC, quickly testing a method of doing something without | ||
| 29 | + creating a temporary file, etc.. | ||
| 30 | + | ||
| 31 | + I hope you find it useful and please feel free to submit any bugs/patches (yeah | ||
| 32 | + right)/suggestions to: | ||
| 42 | 33 | robertanthonyfarrell@gmail.com | |
| 43 | - or place them at the bitbucket issue page for this | ||
| 44 | - project at: | ||
| 34 | + or place them at the bitbucket issue page for this project at: | ||
| 45 | 35 | http://bitbucket.org/bobf/bpython/issues/ | |
| 46 | 36 | ||
| 47 | - For any other ways of communicating with bpython | ||
| 48 | - users and devs you can find us at the communication | ||
| 49 | - page on the projects homepage: | ||
| 37 | + For any other ways of communicating with bpython users and devs you can find us | ||
| 38 | + at the communication page on the projects homepage: | ||
| 50 | 39 | http://bpython-interpreter.org/community | |
| 51 | 40 | ||
| 52 | 41 | Hope to see you there! | |
@@ -55,67 +44,58 @@ Features | |||
| 55 | 44 | ======== | |
| 56 | 45 | ||
| 57 | 46 | * In-line syntax highlighting. | |
| 58 | - This uses Pygments for lexing the code as you type, | ||
| 59 | - and colours appropriately. Pygments does a great job | ||
| 60 | - of doing all of the tricky stuff and really leaving | ||
| 61 | - me with very little to do except format the tokens | ||
| 62 | - in all my favourite colours. | ||
| 47 | + This uses Pygments for lexing the code as you type, and colours | ||
| 48 | + appropriately. Pygments does a great job of doing all of the tricky stuff | ||
| 49 | + and really leaving me with very little to do except format the tokens in | ||
| 50 | + all my favourite colours. | ||
| 63 | 51 | ||
| 64 | 52 | * Readline-like autocomplete with suggestions displayed as you type. | |
| 65 | - Thanks to Python's readline interface to libreadline | ||
| 66 | - and a ready-made class for using a Python interpreter's | ||
| 67 | - scope as the dataset, the only work here was displaying | ||
| 68 | - the readline matches as you type in a separate curses | ||
| 69 | - window below/above the cursor. | ||
| 53 | + Thanks to Python's readline interface to libreadline and a ready-made class | ||
| 54 | + for using a Python interpreter's scope as the dataset, the only work here | ||
| 55 | + was displaying the readline matches as you type in a separate curses window | ||
| 56 | + below/above the cursor. | ||
| 70 | 57 | ||
| 71 | 58 | * Expected parameter list. | |
| 72 | - As in a lot of modern IDEs, bpython will attempt to | ||
| 73 | - display a list of parameters for any function you | ||
| 74 | - call. The inspect module is tried first, which works | ||
| 75 | - with any Python function, and then pydoc if that fails, | ||
| 76 | - which seems to be pretty adequate, but obviously | ||
| 77 | - in some cases it's simply not possible. I used pyparsing | ||
| 78 | - to cure my nested parentheses woes; again, it was | ||
| 79 | - nice and easy. | ||
| 59 | + As in a lot of modern IDEs, bpython will attempt to display a list of | ||
| 60 | + parameters for any function you call. The inspect module is tried first, | ||
| 61 | + which works with any Python function, and then pydoc if that fails, which | ||
| 62 | + seems to be pretty adequate, but obviously in some cases it's simply not | ||
| 63 | + possible. I used pyparsing to cure my nested parentheses woes; again, it | ||
| 64 | + was nice and easy. | ||
| 80 | 65 | ||
| 81 | 66 | * Rewind. | |
| 82 | - I didn't call this "Undo" because I thought that would | ||
| 83 | - be misleading, but "Rewind" is probably as bad. The | ||
| 84 | - idea is that the code entered is kept in memory and | ||
| 85 | - when the Rewind function is called, the last line is | ||
| 86 | - popped and the entire code is re-evaluated. As you can | ||
| 87 | - imagine, this has a lot of potential problems, but for | ||
| 88 | - defining classes and functions, I've found it to be | ||
| 89 | - nothing but useful. | ||
| 67 | + I didn't call this "Undo" because I thought that would be misleading, but | ||
| 68 | + "Rewind" is probably as bad. The idea is that the code entered is kept in | ||
| 69 | + memory and when the Rewind function is called, the last line is popped and | ||
| 70 | + the entire code is re-evaluated. As you can imagine, this has a lot of | ||
| 71 | + potential problems, but for defining classes and functions, I've found it | ||
| 72 | + to be nothing but useful. | ||
| 90 | 73 | ||
| 91 | 74 | * Pastebin code/write to file. | |
| 92 | - I don't really use the save thing much, but the pastebin | ||
| 93 | - thing's great. Hit a key and what you see on the screen | ||
| 94 | - will be sent to a pastebin and a URL is returned for you | ||
| 95 | - to do what you like with. I've hardcoded paste.pocoo.org | ||
| 96 | - in for now, that needs to be fixed so it's configurable. | ||
| 75 | + I don't really use the save thing much, but the pastebin thing's great. Hit | ||
| 76 | + a key and what you see on the screen will be sent to a pastebin and a URL | ||
| 77 | + is returned for you to do what you like with. I've hardcoded | ||
| 78 | + paste.pocoo.org in for now, that needs to be fixed so it's configurable. | ||
| 97 | 79 | Next release, I promise. | |
| 98 | 80 | ||
| 99 | 81 | * Flush curses screen to stdout. | |
| 100 | - A featurette, perhaps, but I thought it was worth noting. | ||
| 101 | - I can't personally recall a curses app that does this, | ||
| 102 | - perhaps it's often not useful, but when you quit bpython, | ||
| 103 | - the screen data will be flushed to stdout, so it basically | ||
| 104 | - looks the same as if you had quit the vanilla interpreter. | ||
| 82 | + A featurette, perhaps, but I thought it was worth noting. I can't | ||
| 83 | + personally recall a curses app that does this, perhaps it's often not | ||
| 84 | + useful, but when you quit bpython, the screen data will be flushed to | ||
| 85 | + stdout, so it basically looks the same as if you had quit the vanilla | ||
| 86 | + interpreter. | ||
| 105 | 87 | ||
| 106 | 88 | Configuration | |
| 107 | 89 | ============= | |
| 108 | - See the sample-config file for a list of available options. | ||
| 109 | - You should save your config file as ~/.config/bpython/config | ||
| 110 | - (i.e $XDG_CONFIG_HOME/bpython/config) or specify at the | ||
| 111 | - command line:: | ||
| 90 | + See the sample-config file for a list of available options. You should save | ||
| 91 | + your config file as ~/.config/bpython/config (i.e | ||
| 92 | + $XDG_CONFIG_HOME/bpython/config) or specify at the command line:: | ||
| 112 | 93 | ||
| 113 | 94 | bpython --config /path/to/bpython/config | |
| 114 | 95 | ||
| 115 | 96 | Known Bugs | |
| 116 | 97 | ========== | |
| 117 | - For known bugs please see bpython's issue tracker at | ||
| 118 | - bitbucket: | ||
| 98 | + For known bugs please see bpython's issue tracker at bitbucket: | ||
| 119 | 99 | ||
| 120 | 100 | http://bitbucket.org/bobf/bpython/issues/ | |
| 121 | 101 | ||
@@ -150,6 +130,7 @@ The curses used has a bug where the colours are displayed incorrectly: | |||
| 150 | 130 | ||
| 151 | 131 | To correct this I have provided my windows.theme file. | |
| 152 | 132 | ||
| 153 | - This curses implementation has 16 colors (dark and light versions of the colours) | ||
| 133 | + This curses implementation has 16 colors (dark and light versions of the | ||
| 134 | + colours) | ||
| 154 | 135 | ||
| 155 | 136 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments