Class LTF::Maxima::Reader
In: lib/ltf/maxima.rb
Parent: Object

Maxima::Reader continually reads from Maxima in a thread, blocking when necessary.

Methods

Constants

InputPromptPattern = /^\(\%i\d+\) $/
BytesPerRead = 1024

Attributes

done  [R] 

Public Class methods

Initialize a new Maxima::Reader and immediately start reading in a new thread. done() will return true once Maxima has exited.

  • io: An IO object connected to a Maxima process.

Public Instance methods

Return true if we‘re currently waiting at an input prompt. See sent_input.

Join with the reader thread. Make sure to send quit(); to Maxima first.

Retrieve the next line read. Will return nil when there are no lines left.

To ensure at_input_prompt? gives correct answers, call this method whenever input is sent to Maxima.

[Validate]