From: <Paul_Koning@Dell.com>
To: <dje@google.com>, <khooyp@cs.umd.edu>
Cc: <gdb-patches@sourceware.org>
Subject: RE: Make the "python" command resemble the standard Python interpreter
Date: Thu, 12 Jan 2012 16:55:00 -0000 [thread overview]
Message-ID: <09787EF419216C41A903FD14EE5506DD030F1EB39B@AUSX7MCPC103.AMER.DELL.COM> (raw)
In-Reply-To: <CADPb22SxGFEsAEQ3AvNnbcjWR8QPWDWC-LYq_bnpMQ1awZ_j3A@mail.gmail.com>
>There already is an established behaviour for python without arguments (with or without a terminal).
>
>(gdb) python
> > print 1 + 2
> > end
>3
>(gdb)
>
>I've read the thread and I don't seen anyone raising this issue (could have missed it though. I saw Tom's message re: what output CLI will generate, but this is about behaviour).
>I've read the patch and I don't think using from_tty is ok to select between the different behaviours.
>
>Can we pick a different way of invoking the python interpreter?
But "python" seems rather an intuitive way of doing it. The existing behavior is quite surprising and unintuitive, because it accumulates an entire multi-line string without any parsing, and then hands it off all at once to Python. I see no reason to preserve that behavior if we have a normal Python interactive interpreter loop. That loop does everything the existing thing does and far more/better, so it should replace the old behavior.
For example, if you commit a syntax error, the existing machinery doesn't tell you until much later, when you say "end". The interactive interpreter will tell you at the time you make the error.
paul
next prev parent reply other threads:[~2012-01-12 16:52 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-11 0:31 Khoo Yit Phang
2012-01-11 4:06 ` Joel Brobecker
2012-01-11 10:43 ` Kevin Pouget
2012-01-11 10:59 ` Joel Brobecker
2012-01-11 16:04 ` Khoo Yit Phang
2012-01-11 17:48 ` Khoo Yit Phang
2012-01-11 18:48 ` Kevin Pouget
2012-01-11 19:04 ` Khoo Yit Phang
2012-01-11 19:11 ` Kevin Pouget
2012-01-11 21:06 ` Khoo Yit Phang
2012-01-11 21:33 ` Tom Tromey
2012-01-11 22:22 ` Khoo Yit Phang
2012-01-20 21:25 ` Tom Tromey
2012-01-20 21:31 ` Tom Tromey
2012-01-22 16:42 ` Khoo Yit Phang
2012-01-11 20:56 ` Tom Tromey
2012-01-11 21:30 ` Khoo Yit Phang
2012-01-11 21:41 ` Tom Tromey
2012-01-12 3:07 ` Khoo Yit Phang
2012-01-13 14:09 ` Phil Muldoon
2012-01-13 21:39 ` Khoo Yit Phang
2012-01-12 16:48 ` Doug Evans
2012-01-12 16:52 ` Khoo Yit Phang
2012-01-12 16:55 ` Paul_Koning [this message]
2012-01-12 17:24 ` Joel Brobecker
2012-01-12 17:30 ` Doug Evans
2012-01-12 17:38 ` Paul_Koning
2012-01-12 17:46 ` Doug Evans
2012-01-12 17:48 ` Doug Evans
2012-01-12 17:51 ` Paul_Koning
2012-01-12 18:06 ` Doug Evans
[not found] ` <CADPb22T1ZmfiGeF9g-QZN6pCTBHwT5ByD9ddX_Dhxe4URvTAhw@mail.gmail.com>
2012-01-12 18:21 ` Khoo Yit Phang
2012-01-12 18:36 ` Doug Evans
2012-01-12 18:48 ` Khoo Yit Phang
2012-01-12 21:22 ` Doug Evans
2012-01-12 18:30 ` Doug Evans
2012-01-21 1:56 ` Tom Tromey
2012-01-22 16:57 ` Khoo Yit Phang
2012-01-23 22:17 ` Doug Evans
2012-01-24 17:36 ` Tom Tromey
2012-01-26 18:28 ` Doug Evans
2012-01-30 6:50 ` Khoo Yit Phang
2012-01-30 17:25 ` Doug Evans
2012-01-30 19:57 ` Doug Evans
2012-02-06 20:08 ` Doug Evans
2012-02-06 20:13 ` Paul_Koning
2012-02-06 20:30 ` Khoo Yit Phang
2012-02-06 20:34 ` Doug Evans
2012-02-06 20:59 ` Paul_Koning
2012-02-06 21:54 ` Tom Tromey
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=09787EF419216C41A903FD14EE5506DD030F1EB39B@AUSX7MCPC103.AMER.DELL.COM \
--to=paul_koning@dell.com \
--cc=dje@google.com \
--cc=gdb-patches@sourceware.org \
--cc=khooyp@cs.umd.edu \
/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