Thank you. I was going through the code but I didn't see this feature.

Josh

On Feb 21, 6:19 am, Georg Brandl <[email protected]> wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Am 12.02.2010 22:50, schrieb Josh English:
>
>
>
>
>
> > I am trying to build the documentation for ObjectListView. The OLV
> > docs folder does not have the conf.py file, it's just a folder full
> > of .rst files.
>
> > I don't like to run off command line, so I thought I could do this in
> > Python. Based on the source code for sphinx-build.py, I created the
> > following simple file:
>
> > ---
> > from sphinx import main
>
> > import sys
>
> > sys.exit(main("-b html -C -a c:\olvdocs c:\olvhtml") )
> > ---
>
> > I have tried several variations of the above line, but the most
> > frequent result is:
>
> > ---
> > Error: Cannot find source directory.
> > ---
>
> > Is it impossible to use the main function in Python code. I am hoping
> > to build a GUI around this, to make my future document-building easier.
>
> main() takes a list of arguments, like this:
>
>    main(['sphinx-build', '-bhtml', '-a', 'c:\\olvdocs', 'c:\\olvhtml'])
>
> However, for programmatic usage it is much cleaner to use the application
> interface, like this:
>
>    import sys
>    from sphinx.application import Sphinx
>    app = Sphinx('c:\\olvdocs', 'c:\\olvdocs', 'c:\\olvhtml',
>                 'c:\\olvhtml\\.doctrees', 'html', {}, sys.stdout)
>    app.build(False, [])
>
> Georg
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v2.0.14 (GNU/Linux)
>
> iEYEARECAAYFAkuBQNQACgkQN9GcIYhpnLCeXwCeJ8/XPKiC089vD2vP1GFlTkTT
> wpMAnj0LiW8416FdOs/IqXOqEKTBtkWW
> =sJX1
> -----END PGP SIGNATURE-----

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to