Re: readline and TAB-completion?

2015-11-25 Thread Ulli Horlacher
Peter Otten <__pete...@web.de> wrote: > > Is there a way to make TAB-completion work for other directories, too? > > Remove "/" from the set of delimiters: > > readline.set_completer_delims( > "".join(c for c in readline.get_completer_delims() if c != "/")) Great! > > murksigkeiten > > I

Re: readline and TAB-completion?

2015-11-25 Thread Peter Otten
Ulli Horlacher wrote: > I need an input function with GNU readline support. So far I have: > > import readline > readline.parse_and_bind("tab: complete") > > file = raw_input('File to send: ') > > > Cursor keys are working, but TAB-completion works only in the current > directory.

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-07-09 Thread Michael Torrie
On 07/09/2015 02:42 PM, Marko Rauhamaa wrote: > Skip Montanaro : > >> It makes perfect sense to me that TAB and Ctrl-TAB would generate the >> same keycode, as TAB is itself a control character (Ctrl-I). As the >> Ctrl modifier bit is effectively already set, I don't think you can >> really set it

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-07-09 Thread Marko Rauhamaa
Skip Montanaro : > It makes perfect sense to me that TAB and Ctrl-TAB would generate the > same keycode, as TAB is itself a control character (Ctrl-I). As the > Ctrl modifier bit is effectively already set, I don't think you can > really set it a second time and be able to detect it. If you input

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-07-09 Thread Skip Montanaro
I thought this thread had died down. I guess not quite... It makes perfect sense to me that TAB and Ctrl-TAB would generate the same keycode, as TAB is itself a control character (Ctrl-I). As the Ctrl modifier bit is effectively already set, I don't think you can really set it a second time and be

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-06-29 Thread Cameron Simpson
On 29Jun2015 11:36, Chris Angelico wrote: On Mon, Jun 29, 2015 at 4:55 AM, Steven D'Aprano wrote: Try Ctrl-TAB again, and you'll get "raise" instead of "import". Can anyone else replicate this issue? Is this a Python issue, a problem with the terminal I am using, or readline in general? Co

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-06-28 Thread Chris Angelico
On Mon, Jun 29, 2015 at 4:55 AM, Steven D'Aprano wrote: > Try Ctrl-TAB again, and you'll get "raise" instead of "import". > > Can anyone else replicate this issue? > > Is this a Python issue, a problem with the terminal I am using, or readline > in general? Confirmed with Python 3.6 on Debian Jes

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-06-28 Thread random832
On Sun, Jun 28, 2015, at 14:55, Steven D'Aprano wrote: > I'm trying to use a readline binding for both TAB and Ctrl-TAB, but it's > not > working for me. Whichever I install second seems to over-ride the first. Can you bind it directly to whatever escape sequence ctrl-tab produces? Some terminals

Re: Readline -- cannot bind to both Ctrl-tab and tab at the same time?

2015-06-28 Thread Laura Creighton
I can reproduce this with Python 2.7.9 (default, Mar 1 2015, 12:57:24) on my debian unstable system. On pypy both forms just silently fail to install the binding at all. Since PyPy has its own readline, this is circumstantial evidence that readline is the problem. It's not just you. Laura --

Re: [on topic] Re: readline trick needed

2012-10-16 Thread Ned Deily
In article , Peter Otten <__pete...@web.de> wrote: > Ned Deily wrote: > > Keep in mind that the Python readline module may be linked to either the > > GPL-licensed GNU readline or the BSD-licensed editline (libedit) library > > (the default on newer OS X systems and probably on *BSD systems) and >

Re: [off topic], was Re: [on topic] Re: readline trick needed

2012-10-16 Thread Dwight Hutto
On Tue, Oct 16, 2012 at 10:36 AM, Peter Otten <__pete...@web.de> wrote: > Dwight Hutto wrote: > > I knew I'd eventually regret putting "on topic" into the subject... I didn't write that. If you're referring to OT, it means Off Topic, and a response would be appreciated. And you can call me David,

[off topic], was Re: [on topic] Re: readline trick needed

2012-10-16 Thread Peter Otten
Dwight Hutto wrote: I knew I'd eventually regret putting "on topic" into the subject... Well done, Dwight. -- http://mail.python.org/mailman/listinfo/python-list

Re: [on topic] Re: readline trick needed

2012-10-16 Thread Dwight Hutto
On Tue, Oct 16, 2012 at 7:27 AM, Steven D'Aprano wrote: > On Tue, 16 Oct 2012 10:30:01 +0200, Peter Otten wrote: > >> Steven D'Aprano wrote: >> >>> I'm working with the readline module, and I'm trying to set a key >>> combination to process the current command line by calling a known >>> function,

Re: [on topic] Re: readline trick needed

2012-10-16 Thread Steven D'Aprano
On Tue, 16 Oct 2012 13:20:24 +0100, Robert Kern wrote: > On 10/16/12 12:27 PM, Steven D'Aprano wrote: >> Well, I was hoping for a pure Python solution, rather than having to >> troll through who knows how many thousands of lines of code in a >> language I can barely read. > > Are you confusing I

Re: [on topic] Re: readline trick needed

2012-10-16 Thread Robert Kern
On 10/16/12 12:27 PM, Steven D'Aprano wrote: On Tue, 16 Oct 2012 10:30:01 +0200, Peter Otten wrote: Steven D'Aprano wrote: I'm working with the readline module, and I'm trying to set a key combination to process the current command line by calling a known function, *and* enter the command lin

Re: [on topic] Re: readline trick needed

2012-10-16 Thread Steven D'Aprano
On Tue, 16 Oct 2012 10:30:01 +0200, Peter Otten wrote: > Steven D'Aprano wrote: > >> I'm working with the readline module, and I'm trying to set a key >> combination to process the current command line by calling a known >> function, *and* enter the command line. >> >> Something along the lines

Re: [on topic] Re: readline trick needed

2012-10-16 Thread Peter Otten
Ned Deily wrote: > In article , Peter Otten <__pete...@web.de> > wrote: >> Steven D'Aprano wrote: >> > I'm working with the readline module, and I'm trying to set a key >> > combination to process the current command line by calling a known >> > function, *and* enter the command line. > [...] >> A

Re: [on topic] Re: readline trick needed

2012-10-16 Thread Ned Deily
In article , Peter Otten <__pete...@web.de> wrote: > Steven D'Aprano wrote: > > I'm working with the readline module, and I'm trying to set a key > > combination to process the current command line by calling a known > > function, *and* enter the command line. [...] > Anyway, here's what I came u

[on topic] Re: readline trick needed

2012-10-16 Thread Peter Otten
Steven D'Aprano wrote: > I'm working with the readline module, and I'm trying to set a key > combination to process the current command line by calling a known > function, *and* enter the command line. > > Something along the lines of: > > * execute function spam() in some context where it can a

Re: readline trick needed

2012-10-13 Thread Mark Lawrence
On 13/10/2012 23:52, Mark Lawrence wrote: On 13/10/2012 23:26, Joshua Landau wrote: On 13 October 2012 23:13, Mark Lawrence wrote: On 13/10/2012 22:31, Joshua Landau wrote: With two irritants (including 8), is it not advisable that python-list gets an admin to block these accounts? Eve

Re: readline trick needed

2012-10-13 Thread Mark Lawrence
On 13/10/2012 23:26, Joshua Landau wrote: On 13 October 2012 23:13, Mark Lawrence wrote: On 13/10/2012 22:31, Joshua Landau wrote: With two irritants (including 8), is it not advisable that python-list gets an admin to block these accounts? Even if it does nothing more than slow them, t

Re: readline trick needed

2012-10-13 Thread Chris Angelico
On Sun, Oct 14, 2012 at 9:25 AM, Joshua Landau wrote: > On 13 October 2012 22:44, Chris Angelico wrote: >> >> On Sun, Oct 14, 2012 at 8:31 AM, Joshua Landau >> wrote: >> > With two irritants (including 8), is it not advisable that >> > python-list >> > gets an admin to block these accounts?

Re: readline trick needed

2012-10-13 Thread Joshua Landau
On 13 October 2012 23:13, Mark Lawrence wrote: > On 13/10/2012 22:31, Joshua Landau wrote: > >> >> With two irritants (including 8), is it not advisable that python-list >> gets an admin to block these accounts? Even if it does nothing more than >> slow them, that's something. >> >> > Most ir

Re: readline trick needed

2012-10-13 Thread Joshua Landau
On 13 October 2012 22:44, Chris Angelico wrote: > On Sun, Oct 14, 2012 at 8:31 AM, Joshua Landau > wrote: > > With two irritants (including 8), is it not advisable that > python-list > > gets an admin to block these accounts? Even if it does nothing more than > > slow them, that's something.

Re: readline trick needed

2012-10-13 Thread Mark Lawrence
On 13/10/2012 22:31, Joshua Landau wrote: With two irritants (including 8), is it not advisable that python-list gets an admin to block these accounts? Even if it does nothing more than slow them, that's something. Most irritants are mere amateurs compared to Ilias Lazaridis. I wonder i

Re: readline trick needed

2012-10-13 Thread Chris Angelico
On Sun, Oct 14, 2012 at 8:31 AM, Joshua Landau wrote: > With two irritants (including 8), is it not advisable that python-list > gets an admin to block these accounts? Even if it does nothing more than > slow them, that's something. That's what killfiles are for. You have two options: http:/

Re: readline trick needed

2012-10-13 Thread Joshua Landau
On 13 October 2012 22:14, Roel Schroeven wrote: > Etienne Robillard schreef: > > On Sun, 14 Oct 2012 00:47:52 +1100 >> Chris Angelico wrote: >> >> Excuse me? >>> >>> I'm not overly familiar with readline, so perhaps there is a really >>> obvious way to do what Steven's trying to do, but this p

Re: readline trick needed

2012-10-13 Thread Roel Schroeven
Etienne Robillard schreef: On Sun, 14 Oct 2012 00:47:52 +1100 Chris Angelico wrote: Excuse me? I'm not overly familiar with readline, so perhaps there is a really obvious way to do what Steven's trying to do, but this post does not appear to be the result of a lack of thinking. If it really

Re: readline trick needed

2012-10-13 Thread Etienne Robillard
On Sun, 14 Oct 2012 00:47:52 +1100 Chris Angelico wrote: > Excuse me? > > I'm not overly familiar with readline, so perhaps there is a really > obvious way to do what Steven's trying to do, but this post does not > appear to be the result of a lack of thinking. > > If it really IS that obvious

Re: readline trick needed

2012-10-13 Thread Chris Angelico
On Sun, Oct 14, 2012 at 12:44 AM, Etienne Robillard wrote: > Why dont you grow yourself some usable neurons instead ? Don't you realize > now stackoverflow.com is starting > to hurt your capacity to cogitate on your own or have you not realized this > yet? Excuse me? I'm not overly familiar wi

Re: readline trick needed

2012-10-13 Thread Etienne Robillard
On 13 Oct 2012 13:30:14 GMT Steven D'Aprano wrote: > I'm working with the readline module, and I'm trying to set a key > combination to process the current command line by calling a known > function, *and* enter the command line. > > Something along the lines of: > > * execute function spam()

Re: readline for mac python? (really, reproducing mac python packages)

2012-01-02 Thread Ned Deily
In article , K Richard Pixley wrote: > On 1/1/12 19:04 , K Richard Pixley wrote: > > On 1/1/12 16:49 , K Richard Pixley wrote: > >> I'm having trouble finding a reasonable python environment on mac. > >> > >> The supplied binaries, (2.7.2, 3.2.2), are built with old versions of > >> macosx and ar

Re: readline for mac python? (really, reproducing mac python packages)

2012-01-02 Thread K Richard Pixley
On 1/1/12 19:04 , K Richard Pixley wrote: On 1/1/12 16:49 , K Richard Pixley wrote: I'm having trouble finding a reasonable python environment on mac. The supplied binaries, (2.7.2, 3.2.2), are built with old versions of macosx and are not capable of building any third party packages that requi

Re: readline for mac python? (really, reproducing mac python packages)

2012-01-01 Thread K Richard Pixley
On 1/1/12 16:49 , K Richard Pixley wrote: I'm having trouble finding a reasonable python environment on mac. The supplied binaries, (2.7.2, 3.2.2), are built with old versions of macosx and are not capable of building any third party packages that require gcc. The source builds easily enough ou

Re: Readline and Python 2.6.1 on a Mac

2009-01-16 Thread James Brady
> s/"bind ^I rl_complete"/"tab: complete"/ > > > > -- >  Ned Deily, >  n...@acm.org Perfect, thanks Ned! -- http://mail.python.org/mailman/listinfo/python-list

Re: Readline and Python 2.6.1 on a Mac

2009-01-15 Thread Ned Deily
In article <4632a161-ed13-477c-a40a-2b606fda1...@a29g2000pra.googlegroups.com>, James Brady wrote: > Hi, I just upgraded Python from 2.5.2 up to 2.6.1 on my 10.5 Mac > (installed from the DMG here: http://www.python.org/download/releases/2.6.1/), > and I'm having some problems with readline and

Re: readline() & seek() ???

2008-06-06 Thread Kam-Hung Soh
Chris wrote: On Jun 6, 5:13 am, Kam-Hung Soh <[EMAIL PROTECTED]> wrote: Tim Roberts wrote: DataSmash <[EMAIL PROTECTED]> wrote: I have a text file that contains thousands of lines and each line is 256 characters long. This is my task: For each line in the file, move to the 25th character, if t

Re: readline() & seek() ???

2008-06-05 Thread Chris
On Jun 6, 5:13 am, Kam-Hung Soh <[EMAIL PROTECTED]> wrote: > Tim Roberts wrote: > > DataSmash <[EMAIL PROTECTED]> wrote: > >> I have a text file that contains thousands of lines and each line is > >> 256 characters long. > > >> This is my task: > >> For each line in the file, move to the 25th chara

Re: readline() & seek() ???

2008-06-05 Thread Kam-Hung Soh
Tim Roberts wrote: DataSmash <[EMAIL PROTECTED]> wrote: I have a text file that contains thousands of lines and each line is 256 characters long. This is my task: For each line in the file, move to the 25th character, if the character is a "T", move to the 35th character of the line and read 5

Re: readline() & seek() ???

2008-06-05 Thread DataSmash
On Jun 5, 3:50 am, Carl Banks <[EMAIL PROTECTED]> wrote: > On Jun 4, 5:30 pm, DataSmash <[EMAIL PROTECTED]> wrote: > > > Hi group, > > I have a text file that contains thousands of lines and each line is > > 256 characters long. > > > This is my task: > > For each line in the file, move to the 25th

Re: readline() & seek() ???

2008-06-05 Thread Carl Banks
On Jun 4, 5:30 pm, DataSmash <[EMAIL PROTECTED]> wrote: > Hi group, > I have a text file that contains thousands of lines and each line is > 256 characters long. > > This is my task: > For each line in the file, move to the 25th character, if the > character is a "T", > move to the 35th character o

Re: readline() & seek() ???

2008-06-05 Thread Tim Roberts
DataSmash <[EMAIL PROTECTED]> wrote: > >I have a text file that contains thousands of lines and each line is >256 characters long. > >This is my task: >For each line in the file, move to the 25th character, if the >character is a "T", >move to the 35th character of the line and read 5 characters fr

Re: readline() & seek() ???

2008-06-04 Thread Marc 'BlackJack' Rintsch
On Wed, 04 Jun 2008 14:30:19 -0700, DataSmash wrote: > I have a text file that contains thousands of lines and each line is > 256 characters long. > > This is my task: > For each line in the file, move to the 25th character, if the > character is a "T", > move to the 35th character of the line an

Re: Readline and record separator

2007-11-02 Thread Bruno Desthuilliers
Dennis Lee Bieber a écrit : > On Wed, 31 Oct 2007 11:13:21 +0100, Bruno Desthuilliers > <[EMAIL PROTECTED]> declaimed the > following in comp.lang.python: > >> [1] Coma Separated Values - but the separator can be almost anything. >> > Comma... oops... > though at this time of night I feel

Re: Readline and record separator

2007-10-31 Thread Bruno Desthuilliers
Johny a écrit : > On Oct 30, 8:44 pm, Bruno Desthuilliers > <[EMAIL PROTECTED]> wrote: >> Johny a écrit : >> >>> Is it possible to change record separator when using readline? >>> As far as I know readline reads characters until found '\n' and it is >>> the end of record for readline. >> This is no

Re: Readline and record separator

2007-10-31 Thread Johny
On Oct 30, 8:44 pm, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Johny a écrit : > > > Is it possible to change record separator when using readline? > > As far as I know readline reads characters until found '\n' and it is > > the end of record for readline. > > This is not a "record" separato

Re: Readline and record separator

2007-10-30 Thread Bruno Desthuilliers
Jeff a écrit : > If it's a short file you could slurp the entire file and then split it > however you like using regular expressions. My my my... > I'm not sure if you can alter it, You can. But it hopefully won't alter your binary-compiled system libs. IOW : it's so (obviously) useless that no

Re: Readline and record separator

2007-10-30 Thread Bruno Desthuilliers
Johny a écrit : > Is it possible to change record separator when using readline? > As far as I know readline reads characters until found '\n' and it is > the end of record for readline. This is not a "record" separator, but a newline. As the name implies, file.readline is about reading a text fi

Re: Readline and record separator

2007-10-30 Thread BartlebyScrivener
On Oct 30, 7:21 am, Johny <[EMAIL PROTECTED]> wrote: > My problem is that my record consits several '\n' and when I use > readline it does NOT read the whole my record. > So If I could change '\n' as a record separator for readline, it > would solve my problem. Python Cookbook (great book!) 2nd E

Re: Readline and record separator

2007-10-30 Thread George Sakkis
On Oct 30, 8:21 am, Johny <[EMAIL PROTECTED]> wrote: > Is it possible to change record separator when using readline? > As far as I know readline reads characters until found '\n' and it is > the end of record for readline. > My problem is that my record consits several '\n' and when I use > readli

Re: Readline and record separator

2007-10-30 Thread clbr
On Oct 30, 12:21 pm, Johny <[EMAIL PROTECTED]> wrote: > Is it possible to change record separator when using readline? > As far as I know readline reads characters until found '\n' and it is > the end of record for readline. > My problem is that my record consits several '\n' and when I use > readl

Re: Readline and record separator

2007-10-30 Thread A.T.Hofkamp
On 2007-10-30, Johny <[EMAIL PROTECTED]> wrote: > Is it possible to change record separator when using readline? > As far as I know readline reads characters until found '\n' and it is > the end of record for readline. > My problem is that my record consits several '\n' and when I use > readline it

Re: Readline and record separator

2007-10-30 Thread Jeff
If it's a short file you could slurp the entire file and then split it however you like using regular expressions. I'm not sure if you can alter it, but os.linesp holds the value that is accessed when file.readlines() splits lines. Conceivably, if it were set to 'FOO', 'FOO' would be used to dete

Re: readline support on openSuSE

2007-10-17 Thread gardsted
Milos Prudek wrote: > This question concerns compilation of Python from sources. Specifically > Python > 2.3.6. > > On Kubuntu 7.04, ./configure outputs these lines about readline: > checking for rl_pre_input_hook in -lreadline... yes > checking for rl_completion_matches in -lreadline... yes >

Re: readline() - problem

2007-10-02 Thread Ricardo Aráoz
Paul Hankin wrote: > On Oct 2, 12:25 pm, [EMAIL PROTECTED] wrote: >> Hi! >> I'm a new user of python, and have problem. >> I have a plain ascii file: >> 11..1 >> 12..1 >> 11..1 >> I want to create a new file which contains only lines with '1' on 15th

Re: readline() - problem

2007-10-02 Thread Wayne Brehaut
On Tue, 02 Oct 2007 12:13:21 -, [EMAIL PROTECTED] wrote: >On 2 Pa , 13:39, Ben Finney <[EMAIL PROTECTED]> >wrote: >> [EMAIL PROTECTED] writes: >> > import string >> >> Why import 'string' if you're not using it? >> >> > f=open('/test/test.asc','r') >> > o=open('/test/out.asc','w') >> > for lin

Re: readline() - problem

2007-10-02 Thread piotr
On 2 Pa , 13:39, Ben Finney <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] writes: > > import string > > Why import 'string' if you're not using it? > > > f=open('/test/test.asc','r') > > o=open('/test/out.asc','w') > > for line in f: > > s= f.readline() > > Your line object is already bound to

Re: readline() - problem

2007-10-02 Thread Wesley Brooks
Given a file: t.txt 1 2 1 1 3 1 ### end of file ### file = open('t.txt', 'r') for i, line in enumerate(file): print "Line:", i, "Text:", line would give the result: Line: 0 Text: 1 2 Line: 1 Text: 1 1 Line: 2 Text: 3 1 To check the third character in each line: for line in file

Re: readline() - problem

2007-10-02 Thread Ben Finney
[EMAIL PROTECTED] writes: > import string Why import 'string' if you're not using it? > f=open('/test/test.asc','r') > o=open('/test/out.asc','w') > for line in f: > s= f.readline() Your line object is already bound to the 'line' name in each iteration. You need to use that, not attempt to

Re: readline() - problem

2007-10-02 Thread Paul Hankin
On Oct 2, 12:25 pm, [EMAIL PROTECTED] wrote: > Hi! > I'm a new user of python, and have problem. > I have a plain ascii file: > 11..1 > 12..1 > 11..1 > I want to create a new file which contains only lines with '1' on 15th > position. > I've tried thi

RE: Readline()

2007-03-16 Thread Taylor, Stuart
ime < currentTime: print "timed out" sys.stdout.flush() break time.sleep(1) ________ From: Taylor, Stuart [mailto:[EMAIL PROTECTED] Sent: 13 March 2007 09:50 To: Sick Monkey; Taylor, Stuart Cc:

RE: Readline()

2007-03-13 Thread Taylor, Stuart
_ From: Sick Monkey [mailto:[EMAIL PROTECTED] Sent: 13 March 2007 01:51 To: Taylor, Stuart Cc: python-list@python.org Subject: Re: Readline() Maybe if you show us your code we can better assist you. But maybe you can use a global variable or a try-catch method to keep threads fr

Re: Readline()

2007-03-12 Thread Sick Monkey
Maybe if you show us your code we can better assist you. But maybe you can use a global variable or a try-catch method to keep threads from staying alive and help better control your code. On 3/12/07, Taylor, Stuart <[EMAIL PROTECTED]> wrote: I have been working on running an external process

Re: readline not found error

2006-07-31 Thread Robert Kern
David Bear wrote: > okay. Since I grabbed the python tar file from python.org, do I then assume > that readline is not included in the python source distribution? if so, > where would I find it. If not, what different build instructions do I need > to follow to make it build with readline? Oops.

Re: readline not found error

2006-07-31 Thread David Bear
Robert Kern wrote: > David Bear wrote: >> I built python 2.4.2 for suse linux 9.3. I configured it to be a separate >> instance of python from the version packaged with suse. >> >> Now when I start it I get an error: >> python >> Python 2.4.2 (#4, Jul 27 2006, 14:34:30) >> [GCC 3.3.5 20050117 (pr

Re: readline vi mode in python interactive shell

2005-11-16 Thread [EMAIL PROTECTED]
Well, I subsequently found this: http://groups.google.com/group/gnu.bash.bug/browse_thread/thread/ab3d3d5ff3e1ea89/f50f81b86161b271?lnk=st&q=readline+vi+mode&rnum=25#f50f81b86161b271 to explain it. Bummer ... -- http://mail.python.org/mailman/listinfo/python-list

Re: readline vi mode in python interactive shell

2005-11-16 Thread Micah Elliott
On Nov 16, [EMAIL PROTECTED] wrote: > Hi comp.lang.python: > New to the group and new to python, so don't tear me up too much ... > I installed the GNU readline support in python2.4, and it is working, > but there is one annoying behaviour that I am hoping to squash ... > > Namely, when I hit to

Re: readline installation problem

2005-10-08 Thread Jesper
Hi Jian, I just struggled with the same problem - seems the python 2.4.2 does not recognise readline 5 I finally "solved" the problem by installing readline 4.2, and explicitly pointing out to configure where the readline library is ./configure --with-libs=/usr/local/lib/libreadline.a That fina

Re: readline: edit-and-execute-command

2005-07-05 Thread Michael Hoffman
josh wrote: > anybody know why "edit-and-execute-command" doesn't work in python's > readline? > it doesn't even show up in a dump of readline functions: > Is that a standard readline command? It's not in my readline(3). It might just be added for bash. That said, thi

Re: readline module and white-space

2005-05-19 Thread Simon Percivall
Take a look at readline.get_completer_delims() and readline.set_completer_delims(). -- http://mail.python.org/mailman/listinfo/python-list

Re: readline, rlcompleter

2005-01-12 Thread Mark Asbach
Hi Michele, > readline.parse_and_bind("tab: complete") > > but I don't find a list of recognized key bindings. The python readline module just wraps the GNU Readline Library, so you need to check the manuals of the latter. It's not that much text and you'll find the information needed at: http

Re: readline, rlcompleter

2005-01-11 Thread python
There is a pretty complete (no pun intended) example in the standard cmd module Check file cmd.py in your Python installation .../lib/pythonX.Y/cmd.py, specifically the methods Cmd.preloop() and Cmd.complete(). Another, more elaborate example is in Py

Re: readline, rlcompleter

2005-01-11 Thread David M. Cooke
[EMAIL PROTECTED] writes: > This a case where the documentation is lacking. The standard library > documentation > (http://www.python.org/dev/doc/devel/lib/module-rlcompleter.html) gives > this example > try: > import readline > except ImportError: > print "Module readline not available." > else:

Re: Readline configuration

2005-01-05 Thread Fernando Perez
Mark Roach wrote: > I have readline set up pretty much the same way as in the example in the > python docs (http://docs.python.org/lib/readline-example.html) and > something I find myself doing fairly often is > > type some code > more code > more code > ... > > and then wanting to s

Re: "readline()" omitted '\r' in win32 for dos format text file

2004-12-02 Thread Peter Otten
Newgene wrote: > I have python2.3 installed on win2k. I noticed that when I open a > dos format text file (eol is '\r\n'), readline() always returns a line > ending with '\n' only, not '\r\n'. While I read the same file on unix, > it returns a line ending with '\r\n' correctly. > This makes me dif