5 ms·
Syntax highlighting, auto complete and more within Python interpreter
- iron_ball 16y agoAlso check out DreamPie [ http://dreampie.sourceforge.net/ http://dreampie.sourceforge.net/ ], which is damn good, and has a comparable feature list.
- srbloom 16y agoI recently started using IPython, also with a comparable feature list: http://ipython.scipy.org/moin/ http://ipython.scipy.org/moin/ Does anyone know off the top of their head which of these is the most active?
- yummyfajitas 16y agoI suspect IPython is. I know a number of people using ipython, but I've never heard of the others before today. Ipython is widely used by the scipy crowd, at the very least.
- nailer 16y agoiPython also has ipdb. import ipdb then ipdb.set_trace() Where you'd like to launch ipython in your app.
- vladoh 16y agoI think Eclipse + PyDev has more to offer.
- steiger 16y agoYou can't really compare them. Eclipse is a full-featured, lots-of-megabytes IDE. BPython is just steroids for the Python interpreter.
- j_baker 16y agoLast time I tried out bpython, it seemed to crash at the slightest hint of any error. I'll have to try it again and see if it's improved.
- mdwrigh2 16y agoAfter playing with it for a few minutes, and throwing some intentional errors at it, it seems relatively stable.
- xtacy 16y agoDid I miss something? How do I start this thing? Couldn't find it on Documentation..
- SandB0x 16y ago$ sudo apt-get install bpython $ bpython Or similar if you have a different package manager. You can also build from source: http://bpython-interpreter.org/releases/bpython-0.9.7.tar.gz http://bpython-interpreter.org/releases/bpython-0.9.7.tar.gz ie, this isn't something you can run in your browser.
- jmatt 16y agoFor those mac users out there, Macports is currently at 0.9.6.2. sudo port install py26-bpython
- deleted 16y ago[deleted]
- tvon 16y agoPackage managers aside, you can run: sudo easy_install bpython
- mgrouchy 16y agoor better yet sudo pip install bpython should work anywhere you have pip installed and its the latest version
- redraga 16y agoFedora users can install it as: yum install bpython
- fendrak 16y agoMy favorite reaction to bpython was showing it to somebody, watching them use it for about 30 seconds, and them watching them alias it to 'python' without even thinking :) It blows the default python interpreter environment out of the water: it remembers history between sessions, autocompletes just about everything, and even has a shortcut for dumping code out to Pastebin.
- reynolds 16y agoThis is pretty neat. I turned off auto_display_list and arg_spec (the autocomplete features). I'm not sure if it will replace my normal usage of IDLE, but I definitely dig the syntax highlighting and session history.
- Goosey 16y agoThe tutorial video was highly amusing.
- necubi 16y agoIs there anything comparable for Ruby? I've looked for a nicer irb in the past, but found nothing. Might be a good weekend project.
- counter_ 16y ago* wirble: for syntax highlightning * bond: for more advanced autocompletion * utilitybelt: for pastebin-like commands * sketches: for editing and evaluating code easily * boson: command framework for creating libraries of commands to be loaded as needed * hirb: framework for associating views per class
- jcapote 16y agoCheck this out: http://sketches.rubyforge.org/ http://sketches.rubyforge.org/
- guns 16y agoFor autocompletion add require 'irb/completion' to your ~/.irbrc. If you want auto-indentation: IRB.conf[:AUTO_INDENT] = true If you're a Vim user, you can edit code inside of a Vim buffer with the interactive_editor gem: http://vimcasts.org/episodes/running-vim-within-irb/ or for a more SLIMEy experience, you can try ScreenShell, which allows you to send code from Vim in one GNU Screen window to another running irb, or the interpreter of your choice. http://news.ycombinator.com/item?id=1098876 If you just want to stick to improving the irb experience, the Pickaxe book has a good section on customizing irb: http://ruby-doc.org/docs/ProgrammingRuby/html/irb.html
- pbogdan 16y agoalso: http://pablotron.org/software/wirble/ http://pablotron.org/software/wirble/
- emehrkay 16y agoWow this is nice. I'd love to have the auto complete in Textmate.
- mpobrien 16y agoThis looks very handy. It would be nice if this could be extended to wrap around a Jython shell, presenting a nice way to quickly browse through javadoc info as well.
- nitrogen 16y agoThis is awesome. Just yesterday I was this close to posting an Ask HN looking for a syntax highlighting REPL, and considering writing one myself someday if nobody else does. My addiction to syntax highlighting can now be satisfied without having to fire up Vim or gedit to edit a script. Maybe if I think hard enough about posting an Ask HN for a syntax highlighting bash command prompt, someone will write one of those, too ;).
- ndunn2 16y agoThis is awesome. But the colors seem to interact badly with the terminal backgrounds in Mac OSX. I also can't get any of the function shortcuts (F8 = pastebin) to work; I just get gibberish instead. Also I get a crash when I resize the window: Traceback (most recent call last): File "/usr/local/bin/bpython", line 8, in <module> load_entry_point('bpython==0.9.7', 'console_scripts', 'bpython')() File "/Library/Python/2.5/site-packages/bpython-0.9.7-py2.5.egg/bpython/cli.py", line 1739, in main banner=banner) File "/Library/Python/2.5/site-packages/bpython-0.9.7-py2.5.egg/bpython/cli.py", line 1636, in curses_wrapper return func(stdscr, args, *kwargs) File "/Library/Python/2.5/site-packages/bpython-0.9.7-py2.5.egg/bpython/cli.py", line 1706, in main_curses clirepl.repl() File "/Library/Python/2.5/site-packages/bpython-0.9.7-py2.5.egg/bpython/cli.py", line 996, in repl inp = self.get_line() File "/Library/Python/2.5/site-packages/bpython-0.9.7-py2.5.egg/bpython/cli.py", line 589, in get_line key = self.get_key() File "/Library/Python/2.5/site-packages/bpython-0.9.7-py2.5.egg/bpython/cli.py", line 567, in get_key self.idle(self) File "/Library/Python/2.5/site-packages/bpython-0.9.7-py2.5.egg/bpython/cli.py", line 1579, in idle do_resize(caller) File "/Library/Python/2.5/site-packages/bpython-0.9.7-py2.5.egg/bpython/cli.py", line 1591, in do_resize curses.endwin() _curses.error: endwin() returned ERR
- tomazmuraus 16y agoI have tested it and it's not bad but the IPython (with "save history" & "virtualenv" plugin) + Dreampie combination is still a lot better and way more powerful. I use IPython as my main Python shell replacement (this also includes Django development, debugging - (i)pdb, etc.) and Dreampie when writing a prototype or "playing around".
- nailer 16y agoI use and love ipython/ipdb. Do you know if DreamPie or BPython can be used to debug?