Constructs an Expect that runs cmd with no args
Constructs an Expect that runs cmd with args On linux, this passes the args with cmd on front if required On windows, it passes the args as a single string seperated by spaces
Calls the spawns cleanup routine.
Expects toExpect in output of spawn within Spawns timeout
Expects toExpect in output of spawn within custom timeout
Reads data from the spawn This function will sleep for timeToWait' Duration if nothing was read first time timeToWait is 50.msecs by default
Reads all available data. Ends when subsequent reads dont increase length of allData
Sends command to the pty
Sends a line to the pty. Ensures it ends with newline
Reads and then returns all data after the last succesfull expect. WARNING: May block if spawn is constantly writing data
Returns all data before the last succesfull expect
Sets the default timeout
Sets the timeout to t milliseconds
Returns the timeout
ExpectImpl spawns a process in a Spawn object. You then call expect("desired output"); sendLine("desired Input"); to interact with said process