RE: [PyCrust] 0.6 in the oven, now with PyFilling, should be done cooking soon
Brought to you by:
pobrien
From: Patrick K. O'B. <po...@or...> - 2001-09-19 21:13:01
|
On the one hand, adding code to set the current position to the end wouldn't hurt anything, and would appear to be a good safeguard. On the other hand, I can't picture how this would be necessary unless someone was messing with the cursor position in their code, and I can't imagine why someone would do this. Have you actually run into a situation where the output did not go at the end? If you have, I'd love to hear what the situation was. If you haven't, I'd be reluctant to add the code. Feel free to correct me if I'm not seeing things the way you see them. --- Patrick K. O'Brien Orbtech (http://www.orbtech.com) "I am, therefore I think." -----Original Message----- From: pyc...@li... [mailto:pyc...@li...]On Behalf Of Raul Cota Sent: Wednesday, September 19, 2001 1:02 PM To: pyc...@li... Subject: Re: [PyCrust] 0.6 in the oven, now with PyFilling, should be done cooking soon Well... I took me a while to get back to normal after last week. Patrick: I think the "run" method needs the following lines, to make sure that the "command" and the "output" are written at the very end. def run(self, command, prompt=1, verbose=1): """Execute command within the shell as if it was typed in directly. >>> shell.run('print "this"') >>> print "this" this >>> """ # Go to the very bottom of the text. endpos = self.GetTextLength() self.SetCurrentPos(endpos) command = command.rstrip() if prompt: self.prompt() if verbose: self.write(command) self.push(command) What do you think? |