unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: John Mastro <john.b.mastro@gmail.com>
To: help-gnu-emacs <help-gnu-emacs@gnu.org>
Subject: Re: no echo in python mode
Date: Fri, 28 Aug 2015 10:20:49 -0700	[thread overview]
Message-ID: <CAOj2CQQwydHGVc4UAn=9VfwAYsG2R5uZDSRib1Hn+GxHP5H8hA@mail.gmail.com> (raw)
In-Reply-To: <CAOm4EMt-6hf2KBgF_zR51gozy0o2Gh+qWkfwyR839AU58VdndA@mail.gmail.com>

> 1). emacs -Q tmp.py
> 2). In tmp.py buffer:
> a = 3 + 1
> print a
>
> 3). C-c C-c which runs `python-shell-send-buffer`
> 4). Mini-buffer prompts: Run Python: /usr/bin/python -i
>       Make dedicated process?(y or n) --- y
>       Mini-buffer prompts: sent-eldoc-setup-code
> 5). This is what is shown in the python shell buffer:
>  --------------------------------------------------------------------------------------
> Python 2.7.6 (default, Mar 22 2014, 22:59:56)
> [GCC 4.8.2] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> >>> >>> >>> 4
>>>>
> ----------------------------------------------------------------------------------------
> Note that the command executed is not shown but only the result.  Is it the
> correct behavior? No echoing seems strange to me. Can I make the python
> shell buffer echo whatever commands sent to it?

Yes, that's the correct behavior. The shell prints the output but not
the input, as usual - the only difference is that in this case you type
the input into a `python-mode` buffer rather than an
`inferior-python-mode' buffer.

It seems like it should be possible to create a command that does what
you were expecting (take the text from the Python buffer, insert it into
the REPL buffer, and then `comint-send-input'), but AFAIK such a command
doesn't exist by default.

-- 
john



      reply	other threads:[~2015-08-28 17:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-23 16:38 no echo in python mode Shiyuan
2015-08-28 15:09 ` Shiyuan
2015-08-28 17:20   ` John Mastro [this message]

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='CAOj2CQQwydHGVc4UAn=9VfwAYsG2R5uZDSRib1Hn+GxHP5H8hA@mail.gmail.com' \
    --to=john.b.mastro@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    /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).