Remove unused SConscript functions for building Python examples
This commit is contained in:
parent
e7f346cddf
commit
7a69386b8d
1 changed files with 0 additions and 17 deletions
|
|
@ -1,6 +1,5 @@
|
|||
from __future__ import print_function
|
||||
from buildutils import *
|
||||
import ast
|
||||
|
||||
Import('env', 'build', 'install')
|
||||
|
||||
|
|
@ -9,22 +8,6 @@ localenv = env.Clone()
|
|||
from collections import namedtuple
|
||||
Page = namedtuple('Page', ['name', 'title', 'objects'])
|
||||
|
||||
def extract_python_docstring(pyfile, summary_only=True):
|
||||
""" Returns the docstring from a Python script """
|
||||
with open(pyfile) as f:
|
||||
mod = ast.parse(f.read())
|
||||
doc = ''
|
||||
for node in mod.body:
|
||||
if isinstance(node, ast.Expr) and isinstance(node.value, ast.Str):
|
||||
doc = node.value.s
|
||||
|
||||
doc = doc.strip()
|
||||
|
||||
if summary_only:
|
||||
doc = doc.split('\n\n')[0]
|
||||
|
||||
return doc
|
||||
|
||||
|
||||
# Set up functions to pseudo-autodoc the MATLAB toolbox
|
||||
def extract_matlab_docstring(mfile, level):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue