multiline prototyping on command line (oops)

David Arnold arnold at dstc.edu.au
Sat Oct 30 05:57:34 EDT 1999


-->"Eric" == Eric Smith <eric at fruitcom.com> writes:

  Eric> Yeah, it is a nice "shell" interface for testing, however one
  Eric> liners are useful: I use their history arrows to access them
  Eric> from the unix shell You can use the unix fc for editing long
  Eric> ones You can paste them into your scripts. They are easy to go
  Eric> back to and edit etc.

i tend to run the interpreter (which has readline, etc) from an xterm,
and ^Z it when i need the shell, then fg brings it back.  cut & paste
works fine, although the two histories are a little clumsy.

i don't find python's -c option very useful for testing.

  >>> r == 'whatever' or 'de'
  'de'

  Eric> For me this _always_ prints the token after the `or'.

unless the value bound to r is a string "whatever", in which case the
equality test will succeed, and the expression will return the value
of true, 1.



d




More information about the Python-list mailing list