10
[1] For compatibility with Spyder's standalone version, build with py2exe or
10
[1] For compatibility with Spyder's standalone version, built with py2exe or
13
[2] For better performances, see this thread:
14
http://groups.google.com/group/rope-dev/browse_thread/thread/57de5731f202537a
13
[2] For better performance, see this thread:
14
http://groups.google.com/group/rope-dev/browse_thread/thread/57de5731f202537a
16
16
[3] To avoid considering folders without __init__.py as Python packages, thus
17
avoiding side effects as non-working introspection features on a Python module
18
or package when a folder in current directory has the same name.
20
http://groups.google.com/group/rope-dev/browse_thread/thread/924c4b5a6268e618
17
avoiding side effects as non-working introspection features on a Python
18
module or package when a folder in current directory has the same name.
20
http://groups.google.com/group/rope-dev/browse_thread/thread/924c4b5a6268e618
22
22
[4] To avoid rope adding a 2 spaces indent to every docstring it gets, because
23
it breaks the work of Sphinx on the Object Inspector. Also, to better control
24
how to get calltips and docstrings of forced builtin objects.
23
it breaks the work of Sphinx on the Object Inspector. Also, to better
24
control how to get calltips and docstrings of forced builtin objects.
26
[5] To make matplotlib return its docstrings in proper rst, instead of a mix
27
of rst and plain text.
28
31
"""Monkey patching rope
30
See [1], [2] and [3] in module docstring."""
33
See [1], [2], [3], [4] and [5] in module docstring."""
32
35
if rope.VERSION not in ('0.9.4', '0.9.3', '0.9.2'):
33
raise ImportError, "rope %s can't be patched" % rope.VERSION
36
raise ImportError("rope %s can't be patched" % rope.VERSION)
35
38
# [1] Patching project.Project for compatibility with py2exe/cx_Freeze
37
40
from spyderlib.baseconfig import is_py2exe_or_cx_Freeze
196
199
docs = pyfunction.get_doc()
197
200
docs = self._trim_docstring(docs, indents=0)
199
codeassist.PyDocExtractor = PatchedPyDocExtractor
202
codeassist.PyDocExtractor = PatchedPyDocExtractor
205
# [5] Get the right matplotlib docstrings for our Object Inspector
207
import matplotlib as mpl
208
mpl.rcParams['docstring.hardcopy'] = True