view example/exampleSession.txt @ 169:429c8e984df4

all working, except \n\n terminators
author catherine@dellzilla
date Wed, 10 Dec 2008 14:50:42 -0500
parents 786ab5a83eea
children c01f8e612a0a
line wrap: on
line source

This is cut-and-pasted from an interactive example.py session.
Calling `example.py -t` runs it as a series of unit tests,
verifying that the same output is still returned.

(Cmd) help

Documented commands (type help <topic>):
========================================
_load  edit  history  li    load   r    save  set    shortcuts  speak
ed     hi    l        list  orate  run  say   shell  show

Undocumented commands:
======================
EOF  cmdenvironment  eof  exit  help  q  quit

(Cmd) help say
Repeats what you tell me to.
Usage: speak [options] arg

Options:
  -h, --help            show this help message and exit
  -p, --piglatin        atinLay
  -s, --shout           N00B EMULATION MODE
  -r REPEAT, --repeat=REPEAT
                        output [n] times

(Cmd) say goodnight, Gracie
goodnight, Gracie
(Cmd) say -ps --repeat=5 goodnight, Gracie
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
(Cmd) set
prompt: (Cmd)
editor: gedit
echo: False
maxrepeats: 3
(Cmd) set maxrepeats 5
maxrepeats - was: 3
now: 5
(Cmd) say -ps --repeat=5 goodnight, Gracie
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
(Cmd) hi
-------------------------[1]
help
-------------------------[2]
help say
-------------------------[3]
say goodnight, Gracie
-------------------------[4]
say -ps --repeat=5 goodnight, Gracie
-------------------------[5]
set
-------------------------[6]
set maxrepeats 5
-------------------------[7]
say -ps --repeat=5 goodnight, Gracie
(Cmd) hi 3
-------------------------[3]
say goodnight, Gracie
(Cmd) history notappearinginthisfilm
(Cmd) history goodnight
-------------------------[3]
say goodnight, Gracie
-------------------------[4]
say -ps --repeat=5 goodnight, Gracie
-------------------------[7]
say -ps --repeat=5 goodnight, Gracie
(Cmd) run 4
say -ps --repeat=5 goodnight, Gracie
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
OODNIGHT, GRACIEGAY
(Cmd) orate four score and
> seven releases ago
> our BDFL
>
>
four score and
seven releases ago
our BDFL
(Cmd) & look, a shortcut!
look, a shortcut!
(Cmd) say put this in a file > myfile.txt
(Cmd) say < myfile.txt
put this in a file
(Cmd) # comments do nothing
(Cmd) /* C-style comments */ say are invisible
are invisible
(Cmd) orate and they do not /* interfere;
> with multiline */ commands;
and they do not  commands
(Cmd) speak the /* hidden comment */ text
the  text
(Cmd) speak the "unhidden quote" text
the "unhidden quote" text
(Cmd) # Quoted strings immediately following the command are NOT included in the arguments - 
(Cmd) # this is due to a bug in pyparsing.  See:
(Cmd) # https://sourceforge.net/tracker/index.php?func=detail&aid=2412233&group_id=97203&atid=617311
(Cmd) set prompt "---> "
prompt - was: (Cmd)
now: --->
---> say goodbye
goodbye