Create a window for browsing a module's structure. Args: master: parent for widgets. path: full path of file to browse. _htest - bool; change box location when running htest. -utest - bool; suppress contents when running unittest. Glo
(self, master, path, *, _htest=False, _utest=False)
| 72 | # PathBrowser.__init__ does not call __init__ below. |
| 73 | |
| 74 | def __init__(self, master, path, *, _htest=False, _utest=False): |
| 75 | """Create a window for browsing a module's structure. |
| 76 | |
| 77 | Args: |
| 78 | master: parent for widgets. |
| 79 | path: full path of file to browse. |
| 80 | _htest - bool; change box location when running htest. |
| 81 | -utest - bool; suppress contents when running unittest. |
| 82 | |
| 83 | Global variables: |
| 84 | file_open: Function used for opening a file. |
| 85 | |
| 86 | Instance variables: |
| 87 | name: Module name. |
| 88 | file: Full path and module with supported extension. |
| 89 | Used in creating ModuleBrowserTreeItem as the rootnode for |
| 90 | the tree and subsequently in the children. |
| 91 | """ |
| 92 | self.master = master |
| 93 | self.path = path |
| 94 | self._htest = _htest |
| 95 | self._utest = _utest |
| 96 | self.init() |
| 97 | |
| 98 | def close(self, event=None): |
| 99 | "Dismiss the window and the tree nodes." |