Well that explains a lot! I missed that in my rush to see output. At first 
glance the 'autodoc' looks like what I am looking for. I want something a 
bit better than pydoc. Thanks Matthias.  Slow down and when all else fails 
Read The *ing Manual.


Lou

On Tuesday, May 11, 2021 at 12:16:18 AM UTC-6 [email protected] wrote:

> On Tue, May 11, 2021 at 6:32 AM Louis King wrote:
> >
> > Newbe question. I can't add any files to the toctree.
> >
> > Using a windows system. Installes Sphinx no problem.
> > I created a directory on a D: drive
> > changed to the new directory
> > used sphinx-quickstart to build structure
> > used make html to generate an empty ooutput
> > copy a file wabbitFB.py to the new directory
> > add wabbitFB to the index.rst
> > .. toctree::
> > :maxdepth: 2
> >
> > wabbitFB
> >
> > Running make html again results in a warning:
> > D:\tstsphinx\index.rst:9: WARNING: toctree contains reference to 
> nonexisting document 'wabbitFB'
> >
> > What am I missing?? This has got to be dumb simple, but I don't see it.
>
> The "toctree" directive can only contain Sphinx source files.
>
> By default, Sphinx only supports reStructuredText files (with the
> suffix .rst), but support for other source files can be added with
> extensions.
>
> You are trying to use a Python file (with the suffix .py).
>
> If you want to show the contents of this file in your documentation,
> you should create a .rst file and in that you can use the
> "literalinclude" directive
> (
> https://www.sphinx-doc.org/en/master/usage/restructuredtext/directives.html#directive-literalinclude
> ).
>
> If you want to show the documentation of the functions and classes
> that are defined in your Python file, you can try the "autodoc"
> extension (
> https://www.sphinx-doc.org/en/master/usage/extensions/autodoc.html).
>
> Or is it something else you want to use your .py file for?
>
> cheers,
> Matthias
>

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sphinx-users/bd5a544d-b055-421e-8457-5992b60acb55n%40googlegroups.com.

Reply via email to