unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Thierry Volpiatto <thierry.volpiatto@gmail.com>
To: gamename <namesagame-usenet@yahoo.com>
Cc: help-gnu-emacs@gnu.org
Subject: Re: detect prompt change for interactive python
Date: Thu, 17 Jul 2008 08:03:49 +0200	[thread overview]
Message-ID: <87r69tm4hm.fsf@tux.homenetwork> (raw)
In-Reply-To: <eac248d0-adde-45af-b2d4-5af0ce699c0b@x35g2000hsb.googlegroups.com> (gamename's message of "Wed, 16 Jul 2008 11:53:26 -0700 (PDT)")

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




  parent reply	other threads:[~2008-07-17  6:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-16 18:53 detect prompt change for interactive python gamename
2008-07-17  5:34 ` Kevin Rodgers
2008-07-17  6:03 ` Thierry Volpiatto [this message]
     [not found] ` <mailman.14882.1216274764.18990.help-gnu-emacs@gnu.org>
2008-07-18 17:32   ` gamename

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r69tm4hm.fsf@tux.homenetwork \
    --to=thierry.volpiatto@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=namesagame-usenet@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).