[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: detect prompt change for interactive python
From: |
Thierry Volpiatto |
Subject: |
Re: detect prompt change for interactive python |
Date: |
Thu, 17 Jul 2008 08:03:49 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux) |
gamename <namesagame-usenet@yahoo.com> writes:
> 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?
Instead of calling python -i in a shell, use `py-shell' if you use
python-mode or if you use python.el (the emacs default) `python-shell'.
NOTE:python-mode is much better, you can use it with ipython.
--
A + Thierry Volpiatto
Location: Saint-Cyr-Sur-Mer - France