Index: .gitignore
===================================================================
--- .gitignore	(revision 1b605fb2e0c1caf11caf0de26137a4e61df878f6)
+++ .gitignore	(revision 153b75a64d88ad8b0597c08dada6ae0ca20c08d1)
@@ -34,9 +34,4 @@
 /docs/sphinx-docs/build
 /docs/sphinx-docs/source-temp
-/docs/sphinx-docs/source/dev/api
-/docs/sphinx-docs/source/user/guiframe
-/docs/sphinx-docs/source/user/models
-/docs/sphinx-docs/source/user/sasview
-/docs/sphinx-docs/source/user/perspectives
 /docs/sphinx-docs/katex*.zip
 /docs/sphinx-docs/node_modules
Index: docs/sphinx-docs/build_sphinx.py
===================================================================
--- docs/sphinx-docs/build_sphinx.py	(revision df724752143d7fe3872f462fc4837fcb889ebad9)
+++ docs/sphinx-docs/build_sphinx.py	(revision 153b75a64d88ad8b0597c08dada6ae0ca20c08d1)
@@ -8,12 +8,10 @@
 from __future__ import print_function
 
-import subprocess
+import sys
 import os
 from os.path import join as joinpath, abspath, dirname, isdir, exists, relpath
-import sys
-import fnmatch
 import shutil
+import subprocess
 import imp
-
 from glob import glob
 from distutils.dir_util import copy_tree
@@ -21,8 +19,5 @@
 from distutils.spawn import find_executable
 
-from shutil import copy
-from os import listdir
-
-platform = '.%s-%s'%(get_platform(),sys.version[:3])
+PLATFORM = '.%s-%s'%(get_platform(), sys.version[:3])
 
 # sphinx paths
@@ -35,5 +30,5 @@
 SASVIEW_ROOT = joinpath(SPHINX_ROOT, '..', '..')
 SASVIEW_DOCS = joinpath(SPHINX_ROOT, "source")
-SASVIEW_BUILD = abspath(joinpath(SASVIEW_ROOT, "build", "lib"+platform))
+SASVIEW_BUILD = abspath(joinpath(SASVIEW_ROOT, "build", "lib"+PLATFORM))
 SASVIEW_MEDIA_SOURCE = joinpath(SASVIEW_ROOT, "src", "sas")
 SASVIEW_DOC_TARGET = joinpath(SASVIEW_BUILD, "doc")
@@ -65,15 +60,13 @@
 
 def inplace_change(filename, old_string, new_string):
-# Thanks to http://stackoverflow.com/questions/4128144/replace-string-within-file-contents
-        s=open(filename).read()
-        if old_string in s:
-                print('Changing "{old_string}" to "{new_string}"'.format(**locals()))
-                s=s.replace(old_string, new_string)
-                f=open(filename, 'w')
-                f.write(s)
-                f.flush()
-                f.close()
-        else:
-                print('No occurences of "{old_string}" found.'.format(**locals()))
+    # Thanks to http://stackoverflow.com/questions/4128144/replace-string-within-file-contents
+    s = open(filename).read()
+    if old_string in s:
+        print('Changing "{old_string}" to "{new_string}"'.format(**locals()))
+        s = s.replace(old_string, new_string)
+        with open(filename, 'w') as f:
+            f.write(s)
+    else:
+        print('No occurences of "{old_string}" found.'.format(**locals()))
 
 def _remove_dir(dir_path):
@@ -241,6 +234,6 @@
         finally:
             fd_in.close()
-    with ZipFile(cache_path) as zip:
-        zip.extractall(destination)
+    with ZipFile(cache_path) as archive:
+        archive.extractall(destination)
 
 def convert_katex():
Index: docs/sphinx-docs/source/conf.py
===================================================================
--- docs/sphinx-docs/source/conf.py	(revision a8bbba273d487ea330a418be9e5d9c5fe5d8eed8)
+++ docs/sphinx-docs/source/conf.py	(revision 153b75a64d88ad8b0597c08dada6ae0ca20c08d1)
@@ -11,4 +11,5 @@
 # All configuration values have a default; values that are commented out
 # serve to show the default.
+from __future__ import print_function
 
 import sys, os, collections
@@ -22,6 +23,6 @@
 sys.path.insert(0, build_lib)
 sys.path.insert(0, os.path.abspath('_extensions')) # for sphinx extensions
-print "-- path --"
-print "\n".join(sys.path)
+print("-- path --")
+print("\n".join(sys.path))
 
 # -- General configuration -----------------------------------------------------
Index: docs/sphinx-docs/source/rst_prolog
===================================================================
--- docs/sphinx-docs/source/rst_prolog	(revision 1659f54b83a4ef1858ffda40170e4ea6d4e03ca9)
+++ docs/sphinx-docs/source/rst_prolog	(revision 153b75a64d88ad8b0597c08dada6ae0ca20c08d1)
@@ -1,2 +1,4 @@
+.. TODO: This file is ignored!  Prolog comes from sasmodels/doc/rst_prolog.
+
 .. Set up some substitutions to make life easier...
 
