Store Shell input statement into history list.
(self, source)
| 88 | self.prefix = prefix |
| 89 | |
| 90 | def store(self, source): |
| 91 | "Store Shell input statement into history list." |
| 92 | source = source.strip() |
| 93 | if len(source) > 2: |
| 94 | # avoid duplicates |
| 95 | try: |
| 96 | self.history.remove(source) |
| 97 | except ValueError: |
| 98 | pass |
| 99 | self.history.append(source) |
| 100 | self.pointer = None |
| 101 | self.prefix = None |
| 102 | |
| 103 | |
| 104 | if __name__ == "__main__": |