Changeset 0cc77d8 in sasview for src/sas/sasgui/guiframe


Ignore:
Timestamp:
May 1, 2017 5:00:53 PM (8 years ago)
Author:
GitHub <noreply@…>
Children:
733cdcd
Parents:
b9d74f3 (diff), c00a797a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
git-author:
Paul Kienzle <pkienzle@…> (05/01/17 17:00:53)
git-committer:
GitHub <noreply@…> (05/01/17 17:00:53)
Message:

Merge branch 'master' into raise

Location:
src/sas/sasgui/guiframe
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • src/sas/sasgui/guiframe/config.py

    rea45bfe ra1b8fee  
    22    Application settings 
    33""" 
     4from __future__ import print_function 
     5 
    46import time 
    57import os 
     
    150152        :TODO - Need method doc string 
    151153        """ 
    152         print "%g:  %s" % (time.clock(), message) 
     154        print("%g:  %s" % (time.clock(), message)) 
    153155 
    154156        if __EVT_DEBUG_2_FILE__: 
  • src/sas/sasgui/guiframe/data_panel.py

    r959eb01 ra1b8fee  
    1111This module provides Graphic interface for the data_manager module. 
    1212""" 
     13from __future__ import print_function 
     14 
    1315import wx 
    1416from wx.build import build_options 
     
    514516                self.parent.save_data2d(data, default_name) 
    515517            else: 
    516                 print "unable to save this type of data" 
     518                print("unable to save this type of data") 
    517519 
    518520    def layout_data_list(self): 
     
    14971499    except: 
    14981500        # raise 
    1499         print "error", sys.exc_value 
     1501        print("error", sys.exc_value) 
    15001502 
    15011503    app.MainLoop() 
  • src/sas/sasgui/guiframe/data_processor.py

    rb9d74f3 r0cc77d8  
    1818 
    1919""" 
     20from __future__ import print_function 
     21 
    2022import os 
    2123import sys 
     
    20352037        frame.Show(True) 
    20362038    except: 
    2037         print sys.exc_value 
     2039        print(sys.exc_value) 
    20382040 
    20392041    app.MainLoop() 
  • src/sas/sasgui/guiframe/dummyapp.py

    r959eb01 ra1b8fee  
    33Allows the user to set an external data manager 
    44""" 
     5from __future__ import print_function 
     6 
    57import sas.sasgui.guiframe.gui_manager as gui_manager 
    68 
     
    3234        plug_menu.Append(id, '&Do something') 
    3335        def _on_do_something(event): 
    34             print "Do something" 
     36            print("Do something") 
    3537        wx.EVT_MENU(self.parent, id, _on_do_something) 
    3638     
  • src/sas/sasgui/guiframe/gui_style.py

    r959eb01 ra1b8fee  
    33Provide the style for guiframe 
    44""" 
     5from __future__ import print_function 
     6 
    57import wx 
    68import os 
     
    7981if __name__ == "__main__": 
    8082   
    81     print GUIFRAME.DEFAULT_STYLE 
    82     print GUIFRAME.FLOATING_PANEL 
    83     print GUIFRAME.SINGLE_APPLICATION 
     83    print(GUIFRAME.DEFAULT_STYLE) 
     84    print(GUIFRAME.FLOATING_PANEL) 
     85    print(GUIFRAME.SINGLE_APPLICATION) 
    8486    style = GUIFRAME.MULTIPLE_APPLICATIONS 
    8587    style &= GUIFRAME.PLOTTING_ON 
    86     print style == GUIFRAME.PLOTTING_ON 
     88    print(style == GUIFRAME.PLOTTING_ON) 
    8789    style1 = GUIFRAME.MULTIPLE_APPLICATIONS 
    8890    style1 &= (~GUIFRAME.MANAGER_ON) 
    89     print style1 == GUIFRAME.DEFAULT_STYLE 
    90     print style1 
     91    print(style1 == GUIFRAME.DEFAULT_STYLE) 
     92    print(style1) 
  • src/sas/sasgui/guiframe/proxy.py

    r463e7ffc ra1b8fee  
    11#!/usr/bin/env python 
    22# -*- coding: utf-8 -*- 
     3from __future__ import print_function 
     4 
    35import urllib2 
    46import sys 
     
    157159    response = c.connect() 
    158160    if response is not None: 
    159         print 50 * '-' 
     161        print(50 * '-') 
    160162        content = json.loads(response.read().strip()) 
    161163        pprint(content) 
  • src/sas/sasgui/guiframe/gui_manager.py

    r2f22db9 rb9d74f3  
    26132613            wx.PostEvent(self, StatusEvent(status=msg, 
    26142614                                           info="error")) 
    2615             raise ValueError, msg 
     2615            raise ValueError(msg) 
    26162616        # text = str(data) 
    26172617        text = data.__str__() 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/SectorSlicer.py

    r7432acb rb9d74f3  
    235235            msg = "Phi left and phi right are different" 
    236236            msg += " %f, %f" % (self.left_line.phi, self.right_line.phi) 
    237             raise ValueError, msg 
     237            raise ValueError(msg) 
    238238        params["Phi [deg]"] = self.main_line.theta * 180 / math.pi 
    239239        params["Delta_Phi [deg]"] = math.fabs(self.left_line.phi * 180 / math.pi) 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/binder.py

    r463e7ffc rb9d74f3  
    187187        # Check that the trigger is valid 
    188188        if trigger not in self._actions: 
    189             raise ValueError, "%s invalid --- valid triggers are %s" \ 
    190                 % (trigger, ", ".join(self.events)) 
     189            raise ValueError("%s invalid --- valid triggers are %s" \ 
     190                % (trigger, ", ".join(self.events))) 
    191191        # Register the trigger callback 
    192192        self._actions[trigger][artist] = action 
     
    203203        """ 
    204204        if action not in self.events: 
    205             raise ValueError, "Trigger expects " + ", ".join(self.events) 
     205            raise ValueError("Trigger expects " + ", ".join(self.events)) 
    206206        # Tag the event with modifiers 
    207207        for mod in ('alt', 'control', 'shift', 'meta'): 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/boxSlicer.py

    r7432acb rb9d74f3  
    152152            if new_slab is None: 
    153153                msg = "post data:cannot average , averager is empty" 
    154                 raise ValueError, msg 
     154                raise ValueError(msg) 
    155155            self.averager = new_slab 
    156156        if self.direction == "X": 
     
    168168        else: 
    169169            msg = "post data:no Box Average direction was supplied" 
    170             raise ValueError, msg 
     170            raise ValueError(msg) 
    171171        # # Average data2D given Qx or Qy 
    172172        box = self.averager(x_min=x_min, x_max=x_max, y_min=y_min, y_max=y_max, 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py

    r235f514 rb9d74f3  
    199199 
    200200        msg = "1D Panel of group ID %s could not be created" % str(group_id) 
    201         raise ValueError, msg 
     201        raise ValueError(msg) 
    202202 
    203203    def create_2d_panel(self, data, group_id): 
     
    217217            return new_panel 
    218218        msg = "2D Panel of group ID %s could not be created" % str(group_id) 
    219         raise ValueError, msg 
     219        raise ValueError(msg) 
    220220 
    221221    def update_panel(self, data, panel): 
     
    237237            msg += " to panel %s\n" % str(panel.window_caption) 
    238238            msg += "Please edit %s's units, labels" % str(data.name) 
    239             raise ValueError, msg 
     239            raise ValueError(msg) 
    240240        else: 
    241241            if panel.group_id not in data.list_group_id: 
  • src/sas/sasgui/guiframe/local_perspectives/plotting/sector_mask.py

    r7432acb rb9d74f3  
    175175            msg += "different %f, %f" % (self.left_line.phi, 
    176176                                         self.right_line.phi) 
    177             raise ValueError, msg 
     177            raise ValueError(msg) 
    178178        params["Phi"] = self.main_line.theta 
    179179        params["Delta_Phi"] = math.fabs(self.left_line.phi) 
  • src/sas/sasgui/guiframe/plugin_base.py

    r7432acb rb9d74f3  
    277277        """ 
    278278        msg = "%s plugin: does not support import theory" % str(self.sub_menu) 
    279         raise ValueError, msg 
     279        raise ValueError(msg) 
    280280 
    281281    def on_set_state_helper(self, event): 
Note: See TracChangeset for help on using the changeset viewer.