help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: detect prompt change for interactive python


From: Kevin Rodgers
Subject: Re: detect prompt change for interactive python
Date: Wed, 16 Jul 2008 23:34:39 -0600
User-agent: Thunderbird 2.0.0.14 (Macintosh/20080421)

gamename wrote:
Hi,

My normal prompt is "> ".  When I start python interactively with
"python -i", the prompt is now set to ">>> ".

Everything works fine except when I try to recall the previous
commands with "comint-previous-input".  The previous command is
restored to a position just after the first ">" sign.

Here are some examples.

bash prompt:
oldCmdRecalled

python interactive:
oldCmdRecalled>>

behavior I want:
oldCmdRecalled

How do I dynamically set the buffer to accept ">>>" as a prompt and
restore commands in the correct spot?

Both shell-mode and inferior-python-mode are based on comint-mode, so
`C-h v comint-prompt-regexp'.  But I suspect what you really want is
`M-x run-python'.

--
Kevin Rodgers
Denver, Colorado, USA





reply via email to

[Prev in Thread] Current Thread [Next in Thread]