Re: What's wrong with Windows Command Prompt (was Re: Error Testing)

2013-10-21 Thread Tim Chase
On 2013-10-21 15:55, David Robinow wrote:
> I wasn't aware that the interactive interpreter on Linux had
> features that the Windows version didn't. I'm curious what those
> features might be.

It's mostly the benefits that come from being built with the readline
library, meaning you get

- command history (Win32 offers this, the rest not AFAIK)

- command-history searchability (control+R)

- the ability to pull down things from previous lines (alt+period in
  particular)

- the ability to comment out the currently typed command without
  executing it (alt+octothorpe)

- the ability to prefix text/commands with a count
  (alt+number_of_times followed by the character/command)

- the ability to insert matching filenames (alt+asterisk after typing
  path relative to the $CWD)

- clearing to the start/end of line (control+U/control+K)

- the ability to paste content (control+Y) previously-cut by ^U/^K

- the ability to transpose adjacent words (alt+T)

- the ability to jump forward/backward to a specified character
  (control+] and control+alt+] followed by the target char) like f/F
  in vi/vim

Those are just a subset of the power offered by readline when built
into Python's interpreter, none of which work (other than that first
one) on Win32's cmd.exe (or, I suppose command.com).

-tkc




-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What's wrong with Windows Command Prompt (was Re: Error Testing)

2013-10-21 Thread David Robinow
On Sat, Oct 19, 2013 at 4:35 PM, Terry Reedy  wrote:
> On 10/19/2013 2:31 PM, Tim Chase wrote:
>>
>> On 2013-10-19 14:08, David Robinow wrote:
>>>
>>> On Sat, Oct 19, 2013 at 9:01 AM, Chris Angelico wrote:

 You can try all these out in the interactive interpreter (you
 probably have IDLE installed, which on Windows is rather nicer to
 work with than the default interactive mode).
>>>
>>>
>>>   IDLE is cross-platform.  Could you explain why you say "on
>>> Windows"?
>> ...
>  [Description of idle  vs. Command Prompt]
 Not quite what I was trying to ask.
I'm well aware that Idle has features that the Python interpreter on
Windows doesn't.
Idle also has features that the unix variants doesn't.
I don't use my Ubuntu much so I'm somewhat ignorant, but I wasn't
aware that the interactive interpreter on Linux had features that the
Windows version didn't. I'm curious what those features might be.
-- 
https://mail.python.org/mailman/listinfo/python-list


Re: What's wrong with Windows Command Prompt (was Re: Error Testing)

2013-10-19 Thread Chris Angelico
On Sun, Oct 20, 2013 at 7:35 AM, Terry Reedy  wrote:
> Idle can recall previous input two different ways, by cursor or key. One can
> use the mouse to select where to edit. CP requires use of arrow keys to move
> the cursor around. Idle recall input *statements*. CP recalls input *lines*.
> Previous multiline statements have to be recalled a line at a time. CP was
> not designed for true multiline commands (as opposed to long commands that
> wrap and display as multiple lines).

This issue applies also to Linux builds with readline. It's Idle's
primary boast, I think, closely followed by hover help for function
signatures.

ChrisA
-- 
https://mail.python.org/mailman/listinfo/python-list


What's wrong with Windows Command Prompt (was Re: Error Testing)

2013-10-19 Thread Terry Reedy

On 10/19/2013 2:31 PM, Tim Chase wrote:

On 2013-10-19 14:08, David Robinow wrote:

On Sat, Oct 19, 2013 at 9:01 AM, Chris Angelico wrote:

You can try all these out in the interactive interpreter (you
probably have IDLE installed, which on Windows is rather nicer to
work with than the default interactive mode).


  IDLE is cross-platform.  Could you explain why you say "on
Windows"?


In my experience, the Win32 Python console lacks readline support
(like my stock Python on the Mac OS X machine I have here), and as
such lacks a lot of the niceties.  At least on Win32, there is
recall of previous commands (my Mac lacks even that), but there's no
easy "search for the previous command I typed that contains the
following keyword" (control-R followed by search term), no easy
"insert all matching filenames here" (alt+asterisk), etc.

Idle may not provide all that, but it hopefully provides at least
*some* basic features that the console python.exe lacks.


Command Prompt almost 'religiously' imitates the DOS character 
interface. The mouse is mostly ignored; it is not tied to the cursor. 
Idle is a normal Windows gui app.


Command Prompt displays a window of k lines of a circular queue of n 
lines, which are initialized as blank. The default n=300 is not enough 
for a test suite run or many help() outputs. If you find the box on the 
3rd tab of properties, n can be increased up to , but if you do, the 
scroll bar becomes rather useless, as it scrolls through all n lines.


Idle has a normal expanding buffer, with no extra blank lines added.

CP does not have proper cut and paste. I'll leave out most of the 
obnoxious details, but selections are rectangular blocks. This is the 
only function for the mouse, and uses a separate mouse cursor. Idle has 
normal cut and paste that works like any other Windows app.


Idle can recall previous input two different ways, by cursor or key. One 
can use the mouse to select where to edit. CP requires use of arrow keys 
to move the cursor around. Idle recall input *statements*. CP recalls 
input *lines*. Previous multiline statements have to be recalled a line 
at a time. CP was not designed for true multiline commands (as opposed 
to long commands that wrap and display as multiple lines).


CP has no menu (other than a few entries when one right-clicks on the 
icon in the upper left). There is no way to directly save or print the 
buffer.


--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list