[Tutor] Fall in love with bpython
Hello, I use bpython interpreter. This is a very good interactive CLI. I want to create a CLI with the same features than bpython. But the cmd std module seems no to be used in this project... Is there a tool where I can plug all my grammary commands line a sort of generic box with completion, highlights, etc... Cheers Karim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Fall in love with bpython
Karim wrote: I use bpython interpreter. This is a very good interactive CLI. I had never heard of it and had to google for it. It appears to be a curses based CLI for *nix and MacOS I want to create a CLI with the same features than bpython. But the cmd std module seems no to be used in this project... Why not read the bpython source to see what they used? Thats the big advantage of open source - its open! (Although they don't make the source explicitly available, I'm assuming the tar file contains the source- it might even be in Python!) They use pygments to parse the source as you type. That would be worth investigating too... HTH, Alan G. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Fall in love with bpython
On 07/27/2011 12:34 AM, Alan Gauld wrote: Karim wrote: I use bpython interpreter. This is a very good interactive CLI. I had never heard of it and had to google for it. It appears to be a curses based CLI for *nix and MacOS Ah Windows user. I want to create a CLI with the same features than bpython. But the cmd std module seems no to be used in this project... Why not read the bpython source to see what they used? Thats the big advantage of open source - its open! (Although they don't make the source explicitly available, I'm assuming the tar file contains the source- it might even be in Python!) They use pygments to parse the source as you type. That would be worth investigating too... Yes I saw mainly pygments which is an OpenSource project... But, I must admit. I will spend 6 months before understanding this. Rhahaaa... This level is high! I saw too cmd2 which is fully compatible and inherit from cmd. But not quite as fun! The main module cli.py is 1700 lignes and the architecture is not very well documented. We will see If I can make any progress during the next month. Thanks Alan PS: Are you still making some hiking in the higlands. Beautiful photos I have seen on your web site! Cheers Alan HTH, Alan G. ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Fall in love with bpython
On 07/28/2011 12:31 AM, Michael Poeltl wrote: hi, have you heard abut ipython? maybe that's helpful for you? http://ipython.scipy.org/moin/python Hello Michael, Yes I saw some article where Ipython and Bpython CLI integrations was made in Django. Thanks for the link I will evaluate it as well. Cheers Karim Michael * Karimkarim.liat...@free.fr [2011-07-27 23:46]: Hello, I use bpython interpreter. This is a very good interactive CLI. I want to create a CLI with the same features than bpython. But the cmd std module seems no to be used in this project... Is there a tool where I can plug all my grammary commands line a sort of generic box with completion, highlights, etc... Cheers Karim -- http://mail.python.org/mailman/listinfo/python-list ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Fall in love with bpython
Hi Karim On 28 July 2011 00:04, Karim karim.liat...@free.fr wrote: On 07/27/2011 12:34 AM, Alan Gauld wrote: Karim wrote: I use bpython interpreter. This is a very good interactive CLI. I had never heard of it and had to google for it. It appears to be a curses based CLI for *nix and MacOS Ah Windows user. Thanks for mentioning bpython -- I had also not heard of it but it duly installed on my ubuntu box from the repositories! I've browsed the code -- it uses ncurses to do the screen IO. You can always read the code, but, as you intimated, unless you're pretty familiar with somewhat large codebases and ncurses it might not be that much use to you just yet. ... Still, it might be worth having a look at the source... :) http://hg.bpython-interpreter.org/bpython/src/bcd836c859aa/bpython/ Walter ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor
Re: [Tutor] Fall in love with bpython
On 07/28/2011 01:32 AM, Walter Prins wrote: Hi Karim On 28 July 2011 00:04, Karim karim.liat...@free.fr mailto:karim.liat...@free.fr wrote: On 07/27/2011 12:34 AM, Alan Gauld wrote: Karim wrote: I use bpython interpreter. This is a very good interactive CLI. I had never heard of it and had to google for it. It appears to be a curses based CLI for *nix and MacOS Ah Windows user. Thanks for mentioning bpython -- I had also not heard of it but it duly installed on my ubuntu box from the repositories! I've browsed the code -- it uses ncurses to do the screen IO. You can always read the code, but, as you intimated, unless you're pretty familiar with somewhat large codebases and ncurses it might not be that much use to you just yet. ... Still, it might be worth having a look at the source... :) http://hg.bpython-interpreter.org/bpython/src/bcd836c859aa/bpython/ Walter Hi, I am using ubuntu too. I used to write large API but in fact I did not know curses and I wanted to see in the code where the keywords are 'injected' to try with my own grammar. I still have to study the details. But it seems that the keywords are imported dynamically from __builtins__ module. Don't know yet how to configure or modify it. Thanks for your advice Regards Karim ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor