Package pyrobot :: Package gui :: Module tty :: Class TTYGui
[frames | no frames]

Class TTYGui

                       gui --+
                             |
InteractiveInterpreter --+   |
                         |   |
        InteractiveConsole --+
                             |
                            TTYGui


Method Summary
  __init__(self, filename, histfile, engine)
  init_history(self, histfile)
  push(self, line)
Push a line to the interpreter.
  raw_input(self, prompt)
  run(self, evalcommand)
  save_history(self, histfile)
    Inherited from InteractiveConsole
  interact(self, banner)
Closely emulate the interactive Python console.
  resetbuffer(self)
Reset the input buffer.
    Inherited from InteractiveInterpreter
  runcode(self, code)
Execute a code object.
  runsource(self, source, filename, symbol)
Compile and run some source in the interpreter.
  showsyntaxerror(self, filename)
Display the syntax error that just occurred.
  showtraceback(self)
Display the exception that just occurred.
  write(self, data)
Write a string.
    Inherited from gui
  addCommandHistory(self, command)
  cleanup(self)
  fileloaddialog(self, type, skel, olddir)
Read a line from user...
  filesavedialog(self, type, skel, startdir)
Read a line from user...
  formatExceptionInfo(self, maxTBlevel)
  freeBrain(self)
  freeRobot(self)
  inform(self, message)
  INThandler(self, signum, frame)
  listCommandHistory(self, search)
  loadBrain(self)
  loadDevice(self)
  loadRobot(self)
  loadSim(self, worldfile)
  makeMenu(self, name, commands)
Could bind a key right here ^1, ^2, ^3...
  makeWatcher(self)
Text-based watcher...
  newBrain(self)
Tk gui overrides this method.
  printCommandLine(self)
  processCommand(self, retval)
  redraw(self)
  resetEngine(self)
  runEngine(self)
  setCurrentConfig(self, config)
  stepBack(self)
  stepEngine(self)
  stepForward(self)
  stepLeft(self)
  stepRight(self)
  stopEngine(self)
  stopRotate(self)
  stopTranslate(self)
  watch(self, exp)

Method Details

push(self, line)

Push a line to the interpreter.

The line should not have a trailing newline; it may have
internal newlines.  The line is appended to a buffer and the
interpreter's runsource() method is called with the
concatenated contents of the buffer as source.  If this
indicates that the command was executed or invalid, the buffer
is reset; otherwise, the command is incomplete, and the buffer
is left as it was after the line was appended.  The return
value is 1 if more input is required, 0 if the line was dealt
with in some way (this is the same as runsource()).
Overrides:
code.InteractiveConsole.push (inherited documentation)

Generated by Epydoc 2.1 on Mon Jul 25 01:39:25 2005 http://epydoc.sf.net