diff --git a/MantidPlot/ipython_widget/__init__.py b/MantidPlot/ipython_widget/__init__.py index fa336c83c449..2ee031ed6b9f 100644 --- a/MantidPlot/ipython_widget/__init__.py +++ b/MantidPlot/ipython_widget/__init__.py @@ -1,4 +1,4 @@ from __future__ import (absolute_import, division, - print_function, unicode_literals) + print_function) from .mantid_ipython_widget import * diff --git a/MantidPlot/ipython_widget/mantid_ipython_widget.py b/MantidPlot/ipython_widget/mantid_ipython_widget.py index 909536b0cbbf..0ac7c5557306 100644 --- a/MantidPlot/ipython_widget/mantid_ipython_widget.py +++ b/MantidPlot/ipython_widget/mantid_ipython_widget.py @@ -1,5 +1,5 @@ from __future__ import (absolute_import, division, - print_function, unicode_literals) + print_function) import inspect import threading @@ -82,4 +82,3 @@ def __init__(self, *args, **kw): self.kernel_manager = kernel_manager self.kernel_client = kernel_client - diff --git a/MantidPlot/mantidplot.py b/MantidPlot/mantidplot.py index 660c34c3d13f..af726851aca8 100644 --- a/MantidPlot/mantidplot.py +++ b/MantidPlot/mantidplot.py @@ -1,11 +1,11 @@ #------------------------------------------------------------------- # mantidplot.py -# -# Load 'pymantidplot' which cannot be called 'mantidplot' because of +# +# Load 'pymantidplot' which cannot be called 'mantidplot' because of # name conflict with the MantidPlot binary (especially on osx) #------------------------------------------------------------------- from __future__ import (absolute_import, division, - print_function, unicode_literals) + print_function) import pymantidplot from pymantidplot import * diff --git a/MantidPlot/mantidplotrc.py b/MantidPlot/mantidplotrc.py index 4642998ec6db..500638e77d34 100644 --- a/MantidPlot/mantidplotrc.py +++ b/MantidPlot/mantidplotrc.py @@ -10,7 +10,7 @@ # #---------------------------------------------- from __future__ import (absolute_import, division, - print_function, unicode_literals) + print_function) if __name__ == '__main__': from six import iteritems as _iteritems diff --git a/MantidPlot/pymantidplot/__init__.py b/MantidPlot/pymantidplot/__init__.py index 90cd8794fb69..7ac4994f8727 100644 --- a/MantidPlot/pymantidplot/__init__.py +++ b/MantidPlot/pymantidplot/__init__.py @@ -3,7 +3,7 @@ Requires that the main script be run from within MantidPlot """ from __future__ import (absolute_import, division, - print_function, unicode_literals) + print_function) # Requires MantidPlot try: import _qti @@ -201,7 +201,7 @@ def newTiledWindow(name=None, sources = None, ncols = None): if ncols is None: ncols = proxy.columnCount() - + if not sources is None: row = 0 col = 0 @@ -679,7 +679,7 @@ def getMantidMatrix(name): """Get a handle to the named Mantid matrix""" return new_proxy(proxies.MantidMatrix, _qti.app.mantidUI.getMantidMatrix, name) - + InstrumentWidget = mantidqtpython.MantidQt.MantidWidgets.InstrumentWidget InstrumentWidgetRenderTab = mantidqtpython.MantidQt.MantidWidgets.InstrumentWidgetRenderTab InstrumentWidgetPickTab = mantidqtpython.MantidQt.MantidWidgets.InstrumentWidgetPickTab diff --git a/MantidPlot/pymantidplot/proxies.py b/MantidPlot/pymantidplot/proxies.py index ffec9646df55..b05f474738ec 100644 --- a/MantidPlot/pymantidplot/proxies.py +++ b/MantidPlot/pymantidplot/proxies.py @@ -4,7 +4,7 @@ reference to None, thus ensuring that further attempts at access do not cause a crash. """ from __future__ import (absolute_import, division, - print_function, unicode_literals) + print_function) from PyQt4 import QtCore, QtGui from PyQt4.QtCore import Qt, pyqtSlot diff --git a/MantidPlot/pymantidplot/pyplot.py b/MantidPlot/pymantidplot/pyplot.py index 0ade6dd83edf..2b96c553c594 100644 --- a/MantidPlot/pymantidplot/pyplot.py +++ b/MantidPlot/pymantidplot/pyplot.py @@ -449,7 +449,7 @@ # File change history is stored at: . # Code Documentation is available at: from __future__ import (absolute_import, division, - print_function, unicode_literals) + print_function) try: import _qti @@ -761,10 +761,10 @@ def __is_array(arg): """ Is the argument a python or numpy list? @param arg :: argument - + Returns :: True if the argument is a python or numpy list """ - return isinstance(arg, list) or isinstance(arg, np.ndarray) + return isinstance(arg, list) or isinstance(arg, np.ndarray) def __is_array_or_int(arg): """ @@ -840,7 +840,7 @@ def __is_workspace(arg): """ Is the argument a Mantid MatrixWorkspace? @param arg :: argument - + Returns :: True if the argument a MatrixWorkspace """ return isinstance(arg, MatrixWorkspace) @@ -849,7 +849,7 @@ def __is_array_of_workspaces(arg): """ Is the argument a sequence of Mantid MatrixWorkspaces? @param arg :: argument - + Returns :: True if the argument is a sequence of MatrixWorkspace """ return __is_array(arg) and len(arg) > 0 and __is_workspace(arg[0]) @@ -861,11 +861,11 @@ def __create_workspace(x, y, name="__array_dummy_workspace"): @param x :: x array @param y :: y array @param name :: workspace name - + Returns :: Workspace - """ + """ alg = AlgorithmManager.create("CreateWorkspace") - alg.setChild(True) + alg.setChild(True) alg.initialize() # fake empty workspace (when doing plot([]), cause setProperty needs non-empty data) if [] == x: @@ -875,7 +875,7 @@ def __create_workspace(x, y, name="__array_dummy_workspace"): alg.setProperty("DataX", x) alg.setProperty("DataY", y) name = name + "_" + str(Figure.fig_seq()) - alg.setPropertyValue("OutputWorkspace", name) + alg.setPropertyValue("OutputWorkspace", name) alg.execute() ws = alg.getProperty("OutputWorkspace").value ADS.addOrReplace(name, ws) # Cannot plot a workspace that is not in the ADS @@ -1178,13 +1178,13 @@ def __process_multiplot_command(plots_seq, **kwargs): def __translate_hold_kwarg(**kwargs): """ - Helper function to translate from hold='on'/'off' kwarg to a True/False value for the + Helper function to translate from hold='on'/'off' kwarg to a True/False value for the mantidplot window and window error_bars @param kwargs :: keyword arguments passed to a plot function, this function only cares about hold. Any value different from 'on' will be considered as 'off' - Returns :: tuple with a couple of values: True/False value for window, and True/False for clearWindow, + Returns :: tuple with a couple of values: True/False value for window, and True/False for clearWindow, to be used with plotSpectrum, plotBin, etc. """ # window and clearWindow @@ -1204,7 +1204,7 @@ def __translate_hold_kwarg(**kwargs): def __translate_error_bars_kwarg(**kwargs): """ - Helper function to translate from error_bars=True/False kwarg to a True/False value for the + Helper function to translate from error_bars=True/False kwarg to a True/False value for the mantidplot error_bars argument @param kwargs :: keyword arguments passed to a plot function. This function only cares about 'error_bars'. @@ -1261,7 +1261,7 @@ def __plot_as_workspaces_list(*args, **kwargs): Plot a series of workspaces @param args :: curve data and options. @param kwargs :: plot line options - + Returns :: List of line objects """ # mantidplot.plotSpectrum can already handle 1 or more input workspaces. @@ -1273,7 +1273,7 @@ def __plot_as_array(*args, **kwargs): Plot from an array @param args :: curve data and options. @param kwargs :: plot line options - + Returns :: the list of curves (1) included in the plot """ y = args[0] @@ -1342,7 +1342,7 @@ def plot_bin(workspaces, indices, *args, **kwargs): """ X-Y plot of the bin counts in a workspace. - Plots one or more bin, selected by indices, using spectra numbers as x-axis and bin counts for + Plots one or more bin, selected by indices, using spectra numbers as x-axis and bin counts for each spectrum as y-axis. @param workspaces :: workspace or list of workspaces (both workspace objects and names accepted) diff --git a/MantidPlot/pymantidplot/qtiplot.py b/MantidPlot/pymantidplot/qtiplot.py index d42217142154..e3848d12bac5 100644 --- a/MantidPlot/pymantidplot/qtiplot.py +++ b/MantidPlot/pymantidplot/qtiplot.py @@ -6,7 +6,7 @@ """ from __future__ import (absolute_import, division, - print_function, unicode_literals) + print_function) # Require MantidPlot try: