Remove unused SConscript functions for building Python examples

This commit is contained in:
Bryan W. Weber 2018-06-09 16:44:24 -04:00 committed by Ray Speth
parent e7f346cddf
commit 7a69386b8d

View file

@ -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):