Hi,
I'm trying to use Sphinx to automatically generate documentation for a
python project. One of the modules requires the scipy.signal package,
which I try to import using the following: import scipy.signal as
signal. Although the code runs just fine, making html with Sphinx
results in a segmentation fault (output below). I can, however, use
"import scipy as sp", making sure to put scipy directory in my
sys.path and the documentation is generated without any problems, but
of course, then I won't have the functionality in my code that I
need.
I made a very simple test case to demonstrate the problem, creating a
testclass with a few docstrings. I am inluding it below along with
my .rst's. Commenting out the line "import scipy.signal as signal",
everything works quite well.
Thanks for any insights into how to avoid seg faulting while still
importing scipy.signal.
Lauren
Sphinx output:
--------------
sphinx-build -b html -d _build/doctrees . _build/html
Running Sphinx v1.0.5
loading pickled environment... done
building [html]: targets for 1 source files that are out of date
updating environment: 0 added, 1 changed, 0 removed
make: *** [html] Segmentation faults
pyexample.py
------------
import scipy.signal as signal
class TestClass:
"""The TestClass class is used to lalala. I would like this
docstring to be documented by sphinx.
"""
def __init__(self, A, B):
self.A = A
self.B = B
# Style to use for printing
def __str__(self):
str = "A = " + self.A.__str__() + "\n\n"
str += "B = " + self.B.__str__() + "\n\n"
return str
def __add__(self):
"""Add A+B."""
total = self.A+self.B
return total
def addx(self,x):
"""Add A+x."""
total = self.A+x
return total
index.rst
----------
.. Test documentation master file, created by
sphinx-quickstart on Sun Jan 2 20:34:04 2011.
You can adapt this file completely to your liking, but it
should at least
contain the root `toctree` directive.
Welcome to Test's documentation!
================================
Contents:
.. toctree::
docstrings
Indices and tables
==================
* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
docstrings.rst
--------------
My Modules and Functions
************************************
Here are some modules.
The pyexample Module
======================
.. automodule:: pyexample
.. autoclass:: pyexample.TestClass
:members:
--
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.