Set package_name >>> docwriter = ApiDocWriter('sphinx') >>> import sphinx >>> docwriter.root_path == sphinx.__path__[0] True >>> docwriter.package_name = 'docutils' >>> import docutils >>> docwriter.root_path == docutils.__path__[0] T
(self, package_name)
| 135 | return self._package_name |
| 136 | |
| 137 | def set_package_name(self, package_name): |
| 138 | ''' Set package_name |
| 139 | |
| 140 | >>> docwriter = ApiDocWriter('sphinx') |
| 141 | >>> import sphinx |
| 142 | >>> docwriter.root_path == sphinx.__path__[0] |
| 143 | True |
| 144 | >>> docwriter.package_name = 'docutils' |
| 145 | >>> import docutils |
| 146 | >>> docwriter.root_path == docutils.__path__[0] |
| 147 | True |
| 148 | ''' |
| 149 | # It's also possible to imagine caching the module parsing here |
| 150 | self._package_name = package_name |
| 151 | self.root_module = import_module(package_name) |
| 152 | self.root_path = self.root_module.__path__[0] |
| 153 | self.written_modules = None |
| 154 | |
| 155 | package_name = property(get_package_name, set_package_name, None, |
| 156 | 'get/set package_name') |
nothing calls this directly
no outgoing calls
no test coverage detected