1

Is it possible to create a documentation in Sphinx (Python), where one of the python scripts imports a module (in this case python-crontab (https://pypi.python.org/pypi/python-crontab)) that I don't have installed?

from crontab import CronTab

Basically I am writing the documentation on a Windows machine. The code works fine, but not on a Windows machine since crontab is only for Linux. Thus, I was wondering if there is a way in Sphinx to tell it that it doesn't matter if it cannot find crontab

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Euler_Salter
  • 3,271
  • 8
  • 33
  • 74
  • 2
    I think it should work if you mock `crontab`. Add `autodoc_mock_imports = ["crontab"]` in conf.py. See https://stackoverflow.com/a/15912502/407651. – mzjn Mar 13 '18 at 13:11

0 Answers0