Index: run.py
===================================================================
--- run.py	(revision 7fb59b2c644037c7e1a0d69a31cdef6d92aad998)
+++ run.py	(revision f36e01fa1b9b521d3f7496b637e33bed18626df2)
@@ -1,4 +1,5 @@
 # -*- coding: utf-8 -*-
 #!/usr/bin/env python
+
 """
 Run sasview in place.  This allows sasview to use the python
@@ -16,6 +17,4 @@
 
 import imp
-import logging
-import logging.config
 import os
 import sys
@@ -38,4 +37,5 @@
     sys.path.insert(0, path)
 
+
 @contextmanager
 def cd(path):
@@ -48,10 +48,12 @@
     os.chdir(old_dir)
 
+
 def import_package(modname, path):
     """Import a package into a particular point in the python namespace"""
-    mod = imp.load_source(modname, abspath(joinpath(path,'__init__.py')))
+    mod = imp.load_source(modname, abspath(joinpath(path, '__init__.py')))
     sys.modules[modname] = mod
     mod.__path__ = [abspath(path)]
     return mod
+
 
 def import_dll(modname, build_path):
@@ -60,7 +62,8 @@
     ext = sysconfig.get_config_var('SO')
     # build_path comes from context
-    path = joinpath(build_path, *modname.split('.'))+ext
-    #print "importing", modname, "from", path
+    path = joinpath(build_path, *modname.split('.')) + ext
+    # print "importing", modname, "from", path
     return imp.load_dynamic(modname, path)
+
 
 def prepare():
@@ -74,6 +77,6 @@
     from distutils.util import get_platform
     root = abspath(dirname(__file__))
-    platform = '%s-%s'%(get_platform(),sys.version[:3])
-    build_path = joinpath(root, 'build','lib.'+platform)
+    platform = '%s-%s' % (get_platform(), sys.version[:3])
+    build_path = joinpath(root, 'build', 'lib.' + platform)
 
     # Notify the help menu that the Sphinx documentation is in a different
@@ -86,13 +89,17 @@
     #if not os.path.exists(mplconfig): os.mkdir(mplconfig)
     #import matplotlib
-    #matplotlib.use('Agg')
-    #print matplotlib.__file__
+    # matplotlib.use('Agg')
+    # print matplotlib.__file__
     #import pylab; pylab.hold(False)
     # add periodictable to the path
-    try: import periodictable
-    except: addpath(joinpath(root, '..','periodictable'))
+    try:
+        import periodictable
+    except:
+        addpath(joinpath(root, '..', 'periodictable'))
 
-    try: import bumps
-    except: addpath(joinpath(root, '..','bumps'))
+    try:
+        import bumps
+    except:
+        addpath(joinpath(root, '..', 'bumps'))
 
     # select wx version
@@ -114,5 +121,5 @@
     # be better to just store the package in src/sas/sasview.
     import sas
-    sas.sasview = import_package('sas.sasview', joinpath(root,'sasview'))
+    sas.sasview = import_package('sas.sasview', joinpath(root, 'sasview'))
 
     # The sas.models package Compiled Model files should be pulled in from the build directory even though
@@ -123,5 +130,5 @@
     import sas.sascalc.pr
     sas.sascalc.pr.core = import_package('sas.sascalc.pr.core',
-                                  joinpath(build_path, 'sas', 'sascalc', 'pr', 'core'))
+                                         joinpath(build_path, 'sas', 'sascalc', 'pr', 'core'))
 
     # Compiled modules need to be pulled from the build directory.
@@ -129,5 +136,5 @@
     import sas.sascalc.file_converter
     sas.sascalc.file_converter.core = import_package('sas.sascalc.file_converter.core',
-                                  joinpath(build_path, 'sas', 'sascalc', 'file_converter', 'core'))                    
+                                                     joinpath(build_path, 'sas', 'sascalc', 'file_converter', 'core'))
 
     # Compiled modules need to be pulled from the build directory.
@@ -135,13 +142,14 @@
     import sas.sascalc.calculator
     sas.sascalc.calculator.core = import_package('sas.sascalc.calculator.core',
-                                  joinpath(build_path, 'sas', 'sascalc', 'calculator', 'core'))
+                                                 joinpath(build_path, 'sas', 'sascalc', 'calculator', 'core'))
 
     sys.path.append(build_path)
 
-    #print "\n".join(sys.path)
+    # print "\n".join(sys.path)
+
 
 if __name__ == "__main__":
-    #Need to add absolute path before actual prepare call,
-    #so logging can be done during initialization process too
+    # Need to add absolute path before actual prepare call,
+    # so logging can be done during initialization process too
     root = abspath(dirname(__file__))
     addpath(joinpath(root, 'sasview'))
Index: sasview/logger_config.py
===================================================================
--- sasview/logger_config.py	(revision 09983d157d6233dedd162cd08839f076f62052fc)
+++ sasview/logger_config.py	(revision f36e01fa1b9b521d3f7496b637e33bed18626df2)
@@ -1,3 +1,11 @@
 from __future__ import print_function
+
+import logging
+import logging.config
+import os
+import os.path
+
+import pkg_resources
+
 
 '''
@@ -5,9 +13,4 @@
 '''
 
-import logging
-import logging.config
-import os
-import os.path
-import pkg_resources
 
 class SetupLogger(object):
@@ -21,6 +24,4 @@
 
     def config_production(self):
-        '''
-        '''
         logger = logging.getLogger(self.name)
         if not logger.root.handlers:
@@ -40,6 +41,4 @@
 
     def _read_config_file(self):
-        '''
-        '''
         if self.config_file is not None:
             logging.config.fileConfig(self.config_file)
Index: sasview/sasview.py
===================================================================
--- sasview/sasview.py	(revision a5a74e90dfeec30f701d6d7aa94d5a03a4bf6bc4)
+++ sasview/sasview.py	(revision f36e01fa1b9b521d3f7496b637e33bed18626df2)
@@ -4,17 +4,15 @@
 """
 ################################################################################
-#This software was developed by the University of Tennessee as part of the
-#Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
-#project funded by the US National Science Foundation.
+# This software was developed by the University of Tennessee as part of the
+# Distributed Data Analysis of Neutron Scattering Experiments (DANSE)
+# project funded by the US National Science Foundation.
 #
-#See the license text in license.txt
+# See the license text in license.txt
 #
-#copyright 2009, University of Tennessee
+# copyright 2009, University of Tennessee
 ################################################################################
 import os
 import os.path
 import sys
-import logging
-import logging.config
 import traceback
 
@@ -22,4 +20,5 @@
 
 logger = SetupLogger(__name__).config_production()
+
 
 # Log the start of the session
@@ -55,9 +54,9 @@
 import wxcruft
 wxcruft.call_later_fix()
-#wxcruft.trace_new_id()
+# wxcruft.trace_new_id()
 
-#Always use private .matplotlib setup to avoid conflicts with other
-#uses of matplotlib
-#Have to check if .sasview exists first
+# Always use private .matplotlib setup to avoid conflicts with other
+# uses of matplotlib
+# Have to check if .sasview exists first
 sasdir = os.path.join(os.path.expanduser("~"),'.sasview')
 if not os.path.exists(sasdir):
@@ -72,6 +71,5 @@
 from sas.sasgui.guiframe.gui_style import GUIFRAME
 from welcome_panel import WelcomePanel
-# For py2exe, import config here
-import local_config
+
 PLUGIN_MODEL_DIR = 'plugin_models'
 APP_NAME = 'SasView'
@@ -87,5 +85,5 @@
         """
         """
-        #from gui_manager import ViewApp
+        # from gui_manager import ViewApp
         self.gui = gui_manager.SasViewApp(0)
         # Set the application manager for the GUI
@@ -116,5 +114,5 @@
             logger.error(traceback.format_exc())
 
-        #Invariant perspective
+        # Invariant perspective
         try:
             import sas.sasgui.perspectives.invariant as module
@@ -134,5 +132,5 @@
             logger.error("Unable to load corfunc module")
 
-        #Calculator perspective
+        # Calculator perspective
         try:
             import sas.sasgui.perspectives.calculator as module
@@ -153,5 +151,4 @@
                                                         APP_NAME)
             logger.error(traceback.format_exc())
-
 
         # Add welcome page
@@ -174,5 +171,5 @@
     if len(sys.argv) > 1:
         ## Run sasview as an interactive python interpreter
-        #if sys.argv[1] == "-i":
+        # if sys.argv[1] == "-i":
         #    sys.argv = ["ipython", "--pylab"]
         #    from IPython import start_ipython
@@ -188,4 +185,5 @@
         SasView()
 
+
 if __name__ == "__main__":
     run()
Index: sasview/setup_exe.py
===================================================================
--- sasview/setup_exe.py	(revision c04fb728a795daa8b0070cd6058c342a26ed0dd5)
+++ sasview/setup_exe.py	(revision f36e01fa1b9b521d3f7496b637e33bed18626df2)
@@ -62,6 +62,6 @@
         sys.argv.remove('--extrapath')
 except:
-    print "Error processing extra python path needed to build SasView\n  %s" % \
-                sys.exc_value
+    print("Error processing extra python path needed to build SasView\n  %s" % \
+                sys.exc_value)
 
 
@@ -83,12 +83,11 @@
         modulefinder.AddPackagePath(win32_folder, p)
     for extra in ["win32com.shell", "win32com.adsi", "win32com.axcontrol",
-                    "win32com.axscript", "win32com.bits", "win32com.ifilter",
-                    "win32com.internet", "win32com.mapi", "win32com.propsys",
-                    "win32com.taskscheduler"]:
-        
-            __import__(extra)
-            m = sys.modules[extra]
-            for p in m.__path__[1:]:
-                modulefinder.AddPackagePath(extra, p)
+                  "win32com.axscript", "win32com.bits", "win32com.ifilter",
+                  "win32com.internet", "win32com.mapi", "win32com.propsys",
+                  "win32com.taskscheduler"]:
+        __import__(extra)
+        m = sys.modules[extra]
+        for p in m.__path__[1:]:
+            modulefinder.AddPackagePath(extra, p)
 
 except ImportError:
@@ -167,5 +166,5 @@
         self.copyright = "copyright 2009 - 2016"
         self.name = "SasView"
-        
+
 #
 # Adapted from http://www.py2exe.org/index.cgi/MatPlotLib
@@ -341,5 +340,5 @@
     ])
 packages.append('periodictable.core') # not found automatically
-#packages.append('IPython')
+# packages.append('IPython')
 includes = ['site', 'lxml._elementpath', 'lxml.etree']
 
@@ -374,5 +373,5 @@
     other_resources = [(24, 1, manifest)],
     dest_base = "SasView"
-    )
+)
 
 # bundle_option = 2
Index: setup.py
===================================================================
--- setup.py	(revision 2a8b4756d56142ea452e38d7e90b9d23a9e6be6a)
+++ setup.py	(revision f36e01fa1b9b521d3f7496b637e33bed18626df2)
@@ -1,16 +1,22 @@
+# -*- coding: utf-8 -*-
+#!/usr/bin/env python
+
 """
     Setup for SasView
-    #TODO: Add checks to see that all the dependencies are on the system
+    TODO: Add checks to see that all the dependencies are on the system
 """
-import sys
+
 import os
 import shutil
-from setuptools import setup, Extension
+import sys
 from distutils.command.build_ext import build_ext
 from distutils.core import Command
+
 import numpy as np
+from setuptools import Extension, setup
 
 # Manage version number ######################################
 import sasview
+
 VERSION = sasview.__version__
 ##############################################################
@@ -25,5 +31,5 @@
 # except when there is no such file
 # Todo : make this list generic
-#plugin_model_list = ['polynominal5.py', 'sph_bessel_jn.py',
+# plugin_model_list = ['polynominal5.py', 'sph_bessel_jn.py',
 #                      'sum_Ap1_1_Ap2.py', 'sum_p1_p2.py',
 #                      'testmodel_2.py', 'testmodel.py',
@@ -35,5 +41,5 @@
 SASVIEW_BUILD = os.path.join(CURRENT_SCRIPT_DIR, "build")
 
-sas_dir = os.path.join(os.path.expanduser("~"),'.sasview')
+sas_dir = os.path.join(os.path.expanduser("~"), '.sasview')
 if os.path.isdir(sas_dir):
     f_path = os.path.join(sas_dir, "sasview.log")
@@ -47,5 +53,5 @@
         os.remove(f_path)
     #f_path = os.path.join(sas_dir, 'plugin_models')
-    #if os.path.isdir(f_path):
+    # if os.path.isdir(f_path):
     #     for f in os.listdir(f_path):
     #         if f in plugin_model_list:
@@ -53,5 +59,6 @@
     #             os.remove(file_path)
     if os.path.exists(SASVIEW_BUILD):
-        print("Removing existing build directory", SASVIEW_BUILD, "for a clean build")
+        print("Removing existing build directory",
+              SASVIEW_BUILD, "for a clean build")
         shutil.rmtree(SASVIEW_BUILD)
 
@@ -63,5 +70,5 @@
 enable_openmp = False
 
-if sys.platform =='darwin':
+if sys.platform == 'darwin':
     if not is_64bits:
         # Disable OpenMP
@@ -77,23 +84,25 @@
 
 # Options to enable OpenMP
-copt =  {'msvc': ['/openmp'],
-         'mingw32' : ['-fopenmp'],
-         'unix' : ['-fopenmp']}
-lopt =  {'msvc': ['/MANIFEST'],
-         'mingw32' : ['-fopenmp'],
-         'unix' : ['-lgomp']}
+copt = {'msvc': ['/openmp'],
+        'mingw32': ['-fopenmp'],
+        'unix': ['-fopenmp']}
+lopt = {'msvc': ['/MANIFEST'],
+        'mingw32': ['-fopenmp'],
+        'unix': ['-lgomp']}
 
 # Platform-specific link options
-platform_lopt = {'msvc' : ['/MANIFEST']}
+platform_lopt = {'msvc': ['/MANIFEST']}
 platform_copt = {}
 
 # Set copts to get compile working on OS X >= 10.9 using clang
-if sys.platform =='darwin':
+if sys.platform == 'darwin':
     try:
         darwin_ver = int(os.uname()[2].split('.')[0])
         if darwin_ver >= 13 and darwin_ver < 14:
-            platform_copt = {'unix' : ['-Wno-error=unused-command-line-argument-hard-error-in-future']}
+            platform_copt = {
+                'unix': ['-Wno-error=unused-command-line-argument-hard-error-in-future']}
     except:
         print("PROBLEM determining Darwin version")
+
 
 class DisableOpenMPCommand(Command):
@@ -114,5 +123,6 @@
         pass
 
-class build_ext_subclass( build_ext ):
+
+class build_ext_subclass(build_ext):
     def build_extensions(self):
         # Get 64-bitness
@@ -124,20 +134,20 @@
             if c in copt:
                 for e in self.extensions:
-                    e.extra_compile_args = copt[ c ]
+                    e.extra_compile_args = copt[c]
             if c in lopt:
                 for e in self.extensions:
-                    e.extra_link_args = lopt[ c ]
+                    e.extra_link_args = lopt[c]
 
         # Platform-specific build options
         if c in platform_lopt:
             for e in self.extensions:
-                e.extra_link_args = platform_lopt[ c ]
+                e.extra_link_args = platform_lopt[c]
 
         if c in platform_copt:
             for e in self.extensions:
-                e.extra_compile_args = platform_copt[ c ]
-
+                e.extra_compile_args = platform_copt[c]
 
         build_ext.build_extensions(self)
+
 
 class BuildSphinxCommand(Command):
@@ -156,4 +166,5 @@
         build_sphinx.rebuild()
 
+
 # sas module
 package_dir["sas"] = os.path.join("src", "sas")
@@ -169,5 +180,6 @@
 
 # sas.sascalc.invariant
-package_dir["sas.sascalc.invariant"] = os.path.join("src", "sas", "sascalc", "invariant")
+package_dir["sas.sascalc.invariant"] = os.path.join(
+    "src", "sas", "sascalc", "invariant")
 packages.extend(["sas.sascalc.invariant"])
 
@@ -175,59 +187,69 @@
 guiframe_path = os.path.join("src", "sas", "sasgui", "guiframe")
 package_dir["sas.sasgui.guiframe"] = guiframe_path
-package_dir["sas.sasgui.guiframe.local_perspectives"] = os.path.join(os.path.join(guiframe_path, "local_perspectives"))
+package_dir["sas.sasgui.guiframe.local_perspectives"] = os.path.join(
+    os.path.join(guiframe_path, "local_perspectives"))
 package_data["sas.sasgui.guiframe"] = ['images/*', 'media/*']
-packages.extend(["sas.sasgui.guiframe", "sas.sasgui.guiframe.local_perspectives"])
+packages.extend(
+    ["sas.sasgui.guiframe", "sas.sasgui.guiframe.local_perspectives"])
 # build local plugin
 for d in os.listdir(os.path.join(guiframe_path, "local_perspectives")):
-    if d not in ['.svn','__init__.py', '__init__.pyc']:
+    if d not in ['.svn', '__init__.py', '__init__.pyc']:
         package_name = "sas.sasgui.guiframe.local_perspectives." + d
         packages.append(package_name)
-        package_dir[package_name] = os.path.join(guiframe_path, "local_perspectives", d)
+        package_dir[package_name] = os.path.join(
+            guiframe_path, "local_perspectives", d)
 
 # sas.sascalc.dataloader
-package_dir["sas.sascalc.dataloader"] = os.path.join("src", "sas", "sascalc", "dataloader")
-package_data["sas.sascalc.dataloader.readers"] = ['defaults.json','schema/*.xsd']
-packages.extend(["sas.sascalc.dataloader","sas.sascalc.dataloader.readers","sas.sascalc.dataloader.readers.schema"])
+package_dir["sas.sascalc.dataloader"] = os.path.join(
+    "src", "sas", "sascalc", "dataloader")
+package_data["sas.sascalc.dataloader.readers"] = [
+    'defaults.json', 'schema/*.xsd']
+packages.extend(["sas.sascalc.dataloader", "sas.sascalc.dataloader.readers",
+                 "sas.sascalc.dataloader.readers.schema"])
 
 # sas.sascalc.calculator
 gen_dir = os.path.join("src", "sas", "sascalc", "calculator", "c_extensions")
 package_dir["sas.sascalc.calculator.core"] = gen_dir
-package_dir["sas.sascalc.calculator"] = os.path.join("src", "sas", "sascalc", "calculator")
-packages.extend(["sas.sascalc.calculator","sas.sascalc.calculator.core"])
-ext_modules.append( Extension("sas.sascalc.calculator.core.sld2i",
-        sources = [
-            os.path.join(gen_dir, "sld2i_module.cpp"),
-            os.path.join(gen_dir, "sld2i.cpp"),
-            os.path.join(gen_dir, "libfunc.c"),
-            os.path.join(gen_dir, "librefl.c"),
-        ],
-        include_dirs=[gen_dir],
-    )
-)
+package_dir["sas.sascalc.calculator"] = os.path.join(
+    "src", "sas", "sascalc", "calculator")
+packages.extend(["sas.sascalc.calculator", "sas.sascalc.calculator.core"])
+ext_modules.append(Extension("sas.sascalc.calculator.core.sld2i",
+                             sources=[
+                                 os.path.join(gen_dir, "sld2i_module.cpp"),
+                                 os.path.join(gen_dir, "sld2i.cpp"),
+                                 os.path.join(gen_dir, "libfunc.c"),
+                                 os.path.join(gen_dir, "librefl.c"),
+                             ],
+                             include_dirs=[gen_dir],
+                             )
+                   )
 
 # sas.sascalc.pr
-srcdir  = os.path.join("src", "sas", "sascalc", "pr", "c_extensions")
+srcdir = os.path.join("src", "sas", "sascalc", "pr", "c_extensions")
 package_dir["sas.sascalc.pr.core"] = srcdir
-package_dir["sas.sascalc.pr"] = os.path.join("src","sas", "sascalc", "pr")
-packages.extend(["sas.sascalc.pr","sas.sascalc.pr.core"])
-ext_modules.append( Extension("sas.sascalc.pr.core.pr_inversion",
-                              sources = [os.path.join(srcdir, "Cinvertor.c"),
-                                         os.path.join(srcdir, "invertor.c"),
-                                         ],
-                              include_dirs=[],
-                              ) )
+package_dir["sas.sascalc.pr"] = os.path.join("src", "sas", "sascalc", "pr")
+packages.extend(["sas.sascalc.pr", "sas.sascalc.pr.core"])
+ext_modules.append(Extension("sas.sascalc.pr.core.pr_inversion",
+                             sources=[os.path.join(srcdir, "Cinvertor.c"),
+                                      os.path.join(srcdir, "invertor.c"),
+                                      ],
+                             include_dirs=[],
+                             ))
 
 # sas.sascalc.file_converter
 mydir = os.path.join("src", "sas", "sascalc", "file_converter", "c_ext")
 package_dir["sas.sascalc.file_converter.core"] = mydir
-package_dir["sas.sascalc.file_converter"] = os.path.join("src","sas", "sascalc", "file_converter")
-packages.extend(["sas.sascalc.file_converter","sas.sascalc.file_converter.core"])
-ext_modules.append( Extension("sas.sascalc.file_converter.core.bsl_loader",
-                              sources = [os.path.join(mydir, "bsl_loader.c")],
-                              include_dirs=[np.get_include()],
-                              ) )
-
-#sas.sascalc.corfunc
-package_dir["sas.sascalc.corfunc"] = os.path.join("src", "sas", "sascalc", "corfunc")
+package_dir["sas.sascalc.file_converter"] = os.path.join(
+    "src", "sas", "sascalc", "file_converter")
+packages.extend(["sas.sascalc.file_converter",
+                 "sas.sascalc.file_converter.core"])
+ext_modules.append(Extension("sas.sascalc.file_converter.core.bsl_loader",
+                             sources=[os.path.join(mydir, "bsl_loader.c")],
+                             include_dirs=[np.get_include()],
+                             ))
+
+# sas.sascalc.corfunc
+package_dir["sas.sascalc.corfunc"] = os.path.join(
+    "src", "sas", "sascalc", "corfunc")
 packages.extend(["sas.sascalc.corfunc"])
 
@@ -237,35 +259,48 @@
 
 # Perspectives
-package_dir["sas.sasgui.perspectives"] = os.path.join("src", "sas", "sasgui", "perspectives")
-package_dir["sas.sasgui.perspectives.pr"] = os.path.join("src", "sas", "sasgui", "perspectives", "pr")
-packages.extend(["sas.sasgui.perspectives","sas.sasgui.perspectives.pr"])
+package_dir["sas.sasgui.perspectives"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives")
+package_dir["sas.sasgui.perspectives.pr"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "pr")
+packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.pr"])
 package_data["sas.sasgui.perspectives.pr"] = ['media/*']
 
-package_dir["sas.sasgui.perspectives.invariant"] = os.path.join("src", "sas", "sasgui", "perspectives", "invariant")
+package_dir["sas.sasgui.perspectives.invariant"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "invariant")
 packages.extend(["sas.sasgui.perspectives.invariant"])
-package_data['sas.sasgui.perspectives.invariant'] = [os.path.join("media",'*')]
-
-package_dir["sas.sasgui.perspectives.fitting"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting")
-package_dir["sas.sasgui.perspectives.fitting.plugin_models"] = os.path.join("src", "sas", "sasgui", "perspectives", "fitting", "plugin_models")
-packages.extend(["sas.sasgui.perspectives.fitting", "sas.sasgui.perspectives.fitting.plugin_models"])
-package_data['sas.sasgui.perspectives.fitting'] = ['media/*', 'plugin_models/*']
-
-packages.extend(["sas.sasgui.perspectives", "sas.sasgui.perspectives.calculator"])
+package_data['sas.sasgui.perspectives.invariant'] = [
+    os.path.join("media", '*')]
+
+package_dir["sas.sasgui.perspectives.fitting"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "fitting")
+package_dir["sas.sasgui.perspectives.fitting.plugin_models"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "fitting", "plugin_models")
+packages.extend(["sas.sasgui.perspectives.fitting",
+                 "sas.sasgui.perspectives.fitting.plugin_models"])
+package_data['sas.sasgui.perspectives.fitting'] = [
+    'media/*', 'plugin_models/*']
+
+packages.extend(["sas.sasgui.perspectives",
+                 "sas.sasgui.perspectives.calculator"])
 package_data['sas.sasgui.perspectives.calculator'] = ['images/*', 'media/*']
 
-package_dir["sas.sasgui.perspectives.corfunc"] = os.path.join("src", "sas", "sasgui", "perspectives", "corfunc")
+package_dir["sas.sasgui.perspectives.corfunc"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "corfunc")
 packages.extend(["sas.sasgui.perspectives.corfunc"])
 package_data['sas.sasgui.perspectives.corfunc'] = ['media/*']
 
-package_dir["sas.sasgui.perspectives.file_converter"] = os.path.join("src", "sas", "sasgui", "perspectives", "file_converter")
+package_dir["sas.sasgui.perspectives.file_converter"] = os.path.join(
+    "src", "sas", "sasgui", "perspectives", "file_converter")
 packages.extend(["sas.sasgui.perspectives.file_converter"])
 package_data['sas.sasgui.perspectives.file_converter'] = ['media/*']
 
 # Data util
-package_dir["sas.sascalc.data_util"] = os.path.join("src", "sas", "sascalc", "data_util")
+package_dir["sas.sascalc.data_util"] = os.path.join(
+    "src", "sas", "sascalc", "data_util")
 packages.append("sas.sascalc.data_util")
 
 # Plottools
-package_dir["sas.sasgui.plottools"] = os.path.join("src", "sas", "sasgui", "plottools")
+package_dir["sas.sasgui.plottools"] = os.path.join(
+    "src", "sas", "sasgui", "plottools")
 packages.append("sas.sasgui.plottools")
 
@@ -275,4 +310,5 @@
 
 EXTENSIONS = [".c", ".cpp"]
+
 
 def append_file(file_list, dir_path):
@@ -294,10 +330,11 @@
                         file_list.append(os.path.join(sub_dir, new_f))
 
+
 # Comment out the following to avoid rebuilding all the models
 file_sources = []
 append_file(file_sources, gen_dir)
 
-#Wojtek's hacky way to add doc files while bundling egg
-#def add_doc_files(directory):
+# Wojtek's hacky way to add doc files while bundling egg
+# def add_doc_files(directory):
 #    paths = []
 #    for (path, directories, filenames) in os.walk(directory):
@@ -332,11 +369,11 @@
     'lxml', 'h5py',
 
-    ## The following dependecies won't install automatically, so assume them
-    ## The numbers should be bumped up for matplotlib and wxPython as well.
+    # The following dependecies won't install automatically, so assume them
+    # The numbers should be bumped up for matplotlib and wxPython as well.
     # 'numpy>=1.4.1', 'scipy>=0.7.2', 'matplotlib>=0.99.1.1',
     # 'wxPython>=2.8.11', 'pil',
-    ]
-
-if os.name=='nt':
+]
+
+if os.name == 'nt':
     required.extend(['html5lib', 'reportlab'])
 else:
@@ -347,25 +384,25 @@
 setup(
     name="sasview",
-    version = VERSION,
-    description = "SasView application",
-    author = "SasView Team",
-    author_email = "developers@sasview.org",
-    url = "http://sasview.org",
-    license = "PSF",
-    keywords = "small-angle x-ray and neutron scattering analysis",
-    download_url = "https://github.com/SasView/sasview.git",
-    package_dir = package_dir,
-    packages = packages,
-    package_data = package_data,
-    ext_modules = ext_modules,
-    install_requires = required,
-    zip_safe = False,
-    entry_points = {
-                    'console_scripts':[
-                                       "sasview = sas.sasview.sasview:run",
-                                       ]
-                    },
-    cmdclass = {'build_ext': build_ext_subclass,
-                'docs': BuildSphinxCommand,
-                'disable_openmp': DisableOpenMPCommand}
-    )
+    version=VERSION,
+    description="SasView application",
+    author="SasView Team",
+    author_email="developers@sasview.org",
+    url="http://sasview.org",
+    license="PSF",
+    keywords="small-angle x-ray and neutron scattering analysis",
+    download_url="https://github.com/SasView/sasview.git",
+    package_dir=package_dir,
+    packages=packages,
+    package_data=package_data,
+    ext_modules=ext_modules,
+    install_requires=required,
+    zip_safe=False,
+    entry_points={
+        'console_scripts': [
+            "sasview = sas.sasview.sasview:run",
+        ]
+    },
+    cmdclass={'build_ext': build_ext_subclass,
+              'docs': BuildSphinxCommand,
+              'disable_openmp': DisableOpenMPCommand}
+)
