| 746 | ) |
| 747 | |
| 748 | def init_instance_attrs(self): |
| 749 | self.more = False |
| 750 | |
| 751 | # command compiler |
| 752 | self.compile = self.compiler_class() |
| 753 | |
| 754 | # Make an empty namespace, which extension writers can rely on both |
| 755 | # existing and NEVER being used by ipython itself. This gives them a |
| 756 | # convenient location for storing additional information and state |
| 757 | # their extensions may require, without fear of collisions with other |
| 758 | # ipython names that may develop later. |
| 759 | self.meta = Struct() |
| 760 | |
| 761 | # Temporary files used for various purposes. Deleted at exit. |
| 762 | # The files here are stored with Path from Pathlib |
| 763 | self.tempfiles = [] |
| 764 | self.tempdirs = [] |
| 765 | |
| 766 | # keep track of where we started running (mainly for crash post-mortem) |
| 767 | # This is not being used anywhere currently. |
| 768 | self.starting_dir = os.getcwd() |
| 769 | |
| 770 | # Indentation management |
| 771 | self.indent_current_nsp = 0 |
| 772 | |
| 773 | # Dict to track post-execution functions that have been registered |
| 774 | self._post_execute = {} |
| 775 | |
| 776 | def init_environment(self): |
| 777 | """Any changes we need to make to the user's environment.""" |