parameters: (self, text=None, rstrip=True)
return_statement: return command
docstring: Extract a command from text which may include a shell prompt.
  
          The command may not necessarily be valid Python syntax.
docstring_summary: Extract a command from text which may include a shell prompt.
docstring_tokens: Extract a command from text which may include a shell prompt .
function: def getCommand(self, text=None, rstrip=True):
          """Extract a command from text which may include a shell prompt.
  
          The command may not necessarily be valid Python syntax."""
          if not text:
              text = self.GetCurLine()[0]
          # Strip the prompt off the front leaving just the command.
          command = self.lstripPrompt(text)
          if command == text:
              command = ''  # Real commands have prompts.
          if rstrip:
              command = command.rstrip()
          return command
function_tokens: def getCommand ( self , text = None , rstrip = True ) : if not text : text = self . GetCurLine ( ) [ 0 ] # Strip the prompt off the front leaving just the command. command = self . lstripPrompt ( text ) if command == text : command = '' # Real commands have prompts. if rstrip : command = command . rstrip ( ) return command