public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* Readline not working in python?
@ 2001-11-16 12:57 Gary Bishop
  2001-11-16 15:32 ` Jason Tishler
  2001-11-27  7:10 ` Gary Bishop
  0 siblings, 2 replies; 4+ messages in thread
From: Gary Bishop @ 2001-11-16 12:57 UTC (permalink / raw)
  To: cygwin

In Python 2.1.1 (#12 Oct 5 2001, 08:16:52) on my Win2k machine with a current 
cygwin installation,

I can't seem to get history or command line editing to work. I've fooled with 
.inputrc and with my CYGWIN environment variable.

It was my impression that this version has readline built in so I guess I'm 
doing something wrong.

Any hints on how to get it to work?

If I type the UPARROW key the cursor just moves up in the window in which 
python is running. When I hit return python complains about illegal 
characters...

Thanks
gb

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Readline not working in python?
  2001-11-16 12:57 Readline not working in python? Gary Bishop
@ 2001-11-16 15:32 ` Jason Tishler
  2001-11-27  8:06   ` Jason Tishler
  2001-11-27  7:10 ` Gary Bishop
  1 sibling, 1 reply; 4+ messages in thread
From: Jason Tishler @ 2001-11-16 15:32 UTC (permalink / raw)
  To: Gary Bishop; +Cc: cygwin

[-- Attachment #1: Type: text/plain, Size: 264 bytes --]

Gary,

On Tue, Nov 27, 2001 at 10:10:42AM -0500, Gary Bishop wrote:
> Any hints on how to get it to work?

Do you have a .pythonrc.py like the attached?

> In Python 2.1.1 (#12 Oct 5 2001, 08:16:52) ...

BTW, is this a Python 2.1.1 that you built yourself?

Jason

[-- Attachment #2: .pythonrc.py --]
[-- Type: text/plain, Size: 385 bytes --]

try:
	import readline
except ImportError:
	print "Module readline not available."
else:
	import rlcompleter
	readline.parse_and_bind("tab: complete")

	import os
	histfile = os.path.join(os.environ["HOME"], ".python_history")
	try:
		readline.read_history_file(histfile)
	except IOError:
		pass
	import atexit
	atexit.register(readline.write_history_file, histfile)
	del os, histfile


[-- Attachment #3: Type: text/plain, Size: 214 bytes --]

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Readline not working in python?
  2001-11-16 12:57 Readline not working in python? Gary Bishop
  2001-11-16 15:32 ` Jason Tishler
@ 2001-11-27  7:10 ` Gary Bishop
  1 sibling, 0 replies; 4+ messages in thread
From: Gary Bishop @ 2001-11-27  7:10 UTC (permalink / raw)
  To: cygwin

In Python 2.1.1 (#12 Oct 5 2001, 08:16:52) on my Win2k machine with a current 
cygwin installation,

I can't seem to get history or command line editing to work. I've fooled with 
.inputrc and with my CYGWIN environment variable.

It was my impression that this version has readline built in so I guess I'm 
doing something wrong.

Any hints on how to get it to work?

If I type the UPARROW key the cursor just moves up in the window in which 
python is running. When I hit return python complains about illegal 
characters...

Thanks
gb

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Readline not working in python?
  2001-11-16 15:32 ` Jason Tishler
@ 2001-11-27  8:06   ` Jason Tishler
  0 siblings, 0 replies; 4+ messages in thread
From: Jason Tishler @ 2001-11-27  8:06 UTC (permalink / raw)
  To: Gary Bishop; +Cc: cygwin

Gary,

On Tue, Nov 27, 2001 at 10:10:42AM -0500, Gary Bishop wrote:
> Any hints on how to get it to work?

Do you have a .pythonrc.py like the attached?

> In Python 2.1.1 (#12 Oct 5 2001, 08:16:52) ...

BTW, is this a Python 2.1.1 that you built yourself?

Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2001-11-27 16:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-16 12:57 Readline not working in python? Gary Bishop
2001-11-16 15:32 ` Jason Tishler
2001-11-27  8:06   ` Jason Tishler
2001-11-27  7:10 ` Gary Bishop

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).