From: Dmitry S. <mi...@gm...> - 2015-02-02 11:47:31
|
Hi, When working on my [math extension][1] I noticed that Python-Markdown refuses to import it when it is installed as a top-level Python module. The failing check is one that is introduced in [commit 8f878c37][2]. The extension imports sucessfully (using `import_module('math')`), but it does not contain `extendMarkdown` function at module level. There is `MathExtension.extendMarkdown` function, though. Is it possible to change the `hasattr(module, 'extendMarkdown')` to something like `hasattr(module, 'makeExtension')`? Then the check will look like (hasattr(module, 'makeExtension') or (class_name and hasattr(module, class_name))) which should be true for any Python-Markdown extension, right? [1]: https://github.com/mitya57/python-markdown-math [2]: https://github.com/waylan/Python-Markdown/commit/8f878c37dc3613b7 -- Dmitry Shachnev |