0

I am using Ubuntu 13.10 version and make project of python in pyDev using Eclipse IDE. I want to make documentation of it. For this purpose I follow the link Documenting Python code using Sphinx.

Following Procedure:

$ sphinx-apidoc -A "Zeb Mustafa" -F -o docs MyPackage/src/

After that what path should should I insert here:

sys.path.insert(0,os.path.abspath('/home/zeb/MyPackage/src/'))

I also try this:

sys.path.insert(0, os.path.abspath('MyPackage/src/'))

Above both line give error:

bash: syntax error near unexpected token `0,'

How I give the path so that conf.py should know what code use for making documentation?

After a lot of digging this problem . I ultimatly do like:

$ make html

And

zeb@zeb-Lenovo-B570:~$ cd docs/
zeb@zeb-Lenovo-B570:~/docs$ make html
zeb@zeb-Lenovo-B570:~/docs$ sphinx-build -b html -d _build/doctrees  . _build//html

All the .html file are empty. Not shown any documentation.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
Zeb
  • 2,687
  • 7
  • 28
  • 36

1 Answers1

0

Try:

sys.path.insert(0, os.path.abspath('..'))

If it doesn't work, please provide the folder structure of your project.

See also Python-Sphinx: How to document one file with functions?, the example commands could be helpful.

Community
  • 1
  • 1
jcarballo
  • 27,395
  • 3
  • 28
  • 28
  • Thanks for reply ,When I Edit conf.py to specify sys.path: `#sys.path.insert(0, os.path.abspath('.'))` ,same problem when I write this by using terminal the error:`bash: syntax error near unexpected token `0,'`. I also uncomment the path in `conf.py` but again nothing change – Zeb Apr 11 '14 at 18:56