This file describes the changes in the expect module.
-------------------------------------------------------------------------
Version 0.4a, 95/08/28

Saad Mufti:
* New features:
  Added a close() method to the expect object.
  Added the global function setdefmatch_max() and the match_max
  member.

* Bug fixes:
  Fixed a problem in interect() where typing ^Z in the spawned program
  and then bringing it to the foreground would generate an
  "Interrupted system call" error.
  PyExpect_Expect() would return the value of a freed memory location.

-------------------------------------------------------------------------
Version 0.4, 95/07/24, 95/08/15

Farzad Farid:
* New features:
  Started adding the code to make the module use the Python regexp
library. Does not work yet. Read the BETA file for more info.

Saad Mufti:
* Bug fixes:
  Fixed bug in store_pattern that disallowed freeing memory on error.

  Improved send method by looping until all data is written.

* The expect method is now a module method instead of a method of an
expect object. Also, the name "expect object" should now more properly
be referred to as "spawn object". For details of the new expect method,
refer to the other docs.

  Note: Because of a bug in the expect 5.17.6 library, these changes will only
work with a higher version of expect. Don Libes has stated that he will be
releasing a new version in a couple of days.

-------------------------------------------------------------------------
Version 0.3, 95/04/08

* Bug fixes:
  Corrected the last functions that did not follow the new naming
conventions.

  Corrected a bug caused by the signal handler. They were
interferences with others modules that could spawn a process. The
module no longers sets a signal handler to catch SIGCHLD, instead it
uses waitpid() to test if the spawned process is still alive.

* New expect object method:
  interact(char) : lets the user interact with the spawned process
                   until he types 'char'.

* Internal changes:
  All functions and methods now have the 3rd field of the PyMethodDef
set to 1. As a consequence PyArg_Parse has been replaced by
PyArg_ParseTuple wherever possible. As a consequence this module now
only compiles with Python 1.2.

* Started using documentation strings.

-------------------------------------------------------------------------
Version 0.2, 95/02/27

Summary:
--------

* Suppressed constants:
  expect.TIMEOUT
  expect.EOF
  expect.FULLBUFFER

* New exceptions:
  expect.timeout    = 'timeout'
  expect.eof        = 'eof'
  expect.fullbuffer = 'full_buffer'

* New expect pattern:
  expect.exp_null

* Renamed global functions:
  expect.timeout    -> expect.setdeftimeout
  expect.loguser    -> expect.setdefloguser
  expect.fullbuffer -> expect.setdeffull_buffer

* New global function:
  expect.setdefremove_nulls

* New expect object members
  timeout       R/W : -1, 0 or positive integer
  full_buffer   R/W : 0 or 1
  remove_nulls  R/W : 0 or 1
  buffer        R/O : string
  match_index   R/O : integer
  match_len     R/O : integer
  match_end     R/O : integer


Details:
--------

* The object now raises an exception in case of timeout, eof or full
buffer. It no longer returns an error code, this is more in the Python
spirit. There are 3 new exceptions for theses cases.

* A new pattern exp_null, is matched if the remove_nulls flags is 0
and there is a NULL byte in the stream. The pattern is still a 3
elements list (type, string, object), so in this case the string value
is unused, maybe I'll change this later.

* Now each created object keeps its own value of the expect flags :
timeout, loguser, full_buffer and remove_nulls.
  These members can be changed by the user and set to individual
values for each object. The module raises an exception if the value is
invalid (e.g. exp.loguser = -1).

* The 4 new global functions let the user change the global value of
these flags : they will be used by the newly created objects. Theses
globals values are initialized with the values provided by the
libexpect package. As in the previous version these functions take an
optional parameter, the new value, and always return the previous
value.

* 4 new objects members are defined:
  buffer : the value of the current internal buffer of expect, there
is one buffer for each expect object. Its value is None at the
beginning. It only makes sense after a call to exp.expect(). If the
previous call to expect() was a failure and there is nothing more in
the buffer the value will be None.

  match_index : index of the first matching character in 'buffer'.
  match_len   : length of the matching string.
  match_end   : index of the caracter after the last matching one.

  Therefore the matching string is :
    exp.string[exp.match_index:exp.match_end]
  If there was not match during the previous call to expect then
match_index = match_len = match_end = 0.

* Now exp.expect() accepts a string or a list of string as the second
element of each tuple.
  value = exp.expect([(exp_exact, 'foo', 1),
                      (exp_exact, ['bar', 'baz'], 2),
                      (exp_regexp, 'prompt.*>', 3)])


-------------------------------------------------------------------------
Version 0.1, 95/02/15

Initial version



