360 """ |
360 """ |
361 Private slot to install the pymdown extensions package via pip. |
361 Private slot to install the pymdown extensions package via pip. |
362 """ |
362 """ |
363 pip = e5App().getObject("Pip") |
363 pip = e5App().getObject("Pip") |
364 pip.installPackages(["pymdown-extensions"], interpreter=sys.executable) |
364 pip.installPackages(["pymdown-extensions"], interpreter=sys.executable) |
365 |
365 self.polishPage() |
|
366 |
|
367 def polishPage(self): |
|
368 """ |
|
369 Public slot to perform some polishing actions. |
|
370 """ |
|
371 try: |
|
372 import pymdownx # __IGNORE_WARNING__ |
|
373 self.previewMarkdownPyMdownInstallPushButton.setEnabled(False) |
|
374 del sys.modules["pymdownx"] |
|
375 except ImportError: |
|
376 self.previewMarkdownPyMdownInstallPushButton.setEnabled(True) |
|
377 |
366 |
378 |
367 def create(dlg): |
379 def create(dlg): |
368 """ |
380 """ |
369 Module function to create the configuration page. |
381 Module function to create the configuration page. |
370 |
382 |