[Tutor] command line

dman dman@dman.ddts.net
Sat, 30 Mar 2002 14:07:21 -0600


On Sat, Mar 30, 2002 at 10:12:58AM -0800, Kirby Urner wrote:
 
| >I understand, though, that people with a windows background are
| >often unfamiliar with the "command line" and want a nice-looking
| >window to work with.  In addition, many windows users underestimate
| >the usefulness and power of a text editor and may not even be
| >familiar with the term "text editor".  IDLE provides both of these
| >things for that target audience.
| 
| There's also the fact that the term window in most Win*
| systems is anemic.

It's only anemic?  I thought it had massive brain damage too.  <0.1 wink>

| Having a command line history is only an option (doskey) and it's
| not very searchable.  But that's irrelevant too, because once in the
| term window's Python shell, there's no uparrow ability to grab
| previously written commands or functions, nor any scroll bar, and
| that about destroys its usability as an interactive environment.

GNU readline.  Not a win32 thing, though.  Unless I actually need a
win32 extension (to make MS Access dbs available via our web server) I
use the cygwin built python.  That one also respsonds to EOF properly
(not only is ^D the escape character, but I don't have to press
"enter" after it!).

| Maybe it's different in Win2k, where uparrow history is somehow
| available.

Not that I've noticed.  cmd.exe is far superior to command.com but
still ages behind bash.  The "DOS" terminal is only slightly better in
that it can remember output lines beyond what fits in the window.

| What's nice in shell mode is to have textbox prompts for
| function args,

Might be nice.  Probably better for beginners.  I kinda think of that
as training wheels.  JBuilder did that (for java code).  While I was
trying out JBuilder, I really didn't remember the arguments to
methods.  It didn't matter how many times I used it, either, because
it would always prompt me.  When I went back to using gvim, I had to
look up the API reference a couple times, then I'd remember the method
and could use it without those prompts.

| I immediately get a yellow rectangle next to the function
| telling me what arguments are expected and what their default
| values are.  That's nice -- even a pro doesn't want to
| memorize all the arg lists for every function. 

If there is enough consistency and intuitiveness then it isn't as bad
as it seems.  Just a personal style, I guess.

| I also like the color coding of key words.

gvim :-).  Any serious text editor will syntax highlight.

| In *nix systems, you can use bang notation to tie a file
| to the executing interpreter (#!python)

You can also do
    python -i <filename>
to drop into an interactive shell after executing the file.  You'll
have the same namespace as the file's module too.

-D

-- 

"640K ought to be enough for anybody" -Bill Gates, 1981