Changeset 811


Ignore:
Timestamp:
Apr 22, 2012 6:06:28 PM (10 years ago)
Author:
jemian
Message:

various, prep for EPICS meeting at SLAC

Location:
moxy/trunk/src/test
Files:
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • moxy/trunk/src/test/SimpleTraitsEpicsTest.py

    r810 r811  
    3535    ETSConfig.toolkit = 'wx'
    3636
    37 from traits.api import *    #@UnusedWildImport
    38 from traitsui.api import *  #@UnusedWildImport
     37from traits.api import *             #@UnusedWildImport
     38from traitsui.api import *           #@UnusedWildImport
    3939from traitsui.key_bindings import *  #@UnusedWildImport
    4040from pyface.api import GUI
     
    4545import epics
    4646
    47 svn_id = "$Id$"
     47SVN_ID = "$Id$"
    4848
    4949
     
    236236    parser = argparse.ArgumentParser(description="EPICS Probe demo")
    237237    parser.add_argument('pv', action='store', nargs='?',
    238                         help="EPICS PV to be watched", default="EpicsDemo1")
    239     parser.add_argument('-v', '--version', action='version', version=svn_id)
     238                        help="EPICS PV name", default="EpicsDemo1")
     239    parser.add_argument('-v', '--version', action='version', version=SVN_ID)
    240240    results = parser.parse_args()
    241241
  • moxy/trunk/src/test/snippet2.py

    r698 r811  
    11
    2 from traits.api import *
    3 from traitsui.api import *
     2from traits.api import *        #@UnusedWildImport
     3from traitsui.api import *      #@UnusedWildImport
    44
    55class Camera(HasTraits):
  • moxy/trunk/src/test/test11.py

    r749 r811  
    2323    def __init__(self, parent):
    2424        wx.Panel.__init__(self, parent)
    25         t = wx.StaticText(self, -1, "This is a PageOne object", (20,20))
     25        wx.StaticText(self, -1, "This is a PageOne object", (20,20))
    2626
    2727class PageTwo(wx.Panel):
    2828    def __init__(self, parent):
    2929        wx.Panel.__init__(self, parent)
    30         t = wx.StaticText(self, -1, "This is a PageTwo object", (40,40))
     30        wx.StaticText(self, -1, "This is a PageTwo object", (40,40))
    3131
    3232class PageThree(wx.Panel):
    3333    def __init__(self, parent):
    3434        wx.Panel.__init__(self, parent)
    35         t = wx.StaticText(self, -1, "This is a PageThree object", (60,60))
     35        wx.StaticText(self, -1, "This is a PageThree object", (60,60))
    3636
    3737
  • moxy/trunk/src/test/traits_probe.py

    r788 r811  
    11#!/usr/bin/env python
    22
     3import argparse
    34import epics
    4 import sys
     5import sys                  #@UnusedImport
    56
    6 from enthought.etsconfig.api import ETSConfig
    7 #ETSConfig.toolkit='qt4'
     7choose_Qt4 = True
     8#choose_Qt4 = False
     9from traits.etsconfig.api import ETSConfig
     10if choose_Qt4:
     11    ETSConfig.toolkit = 'qt4'
     12else:
     13    ETSConfig.toolkit = 'wx'
    814
    915from traits.api import *    #@UnusedWildImport
     
    1319    import KeyBinding, KeyBindings
    1420
     21
    1522key_bindings = KeyBindings(
    1623    KeyBinding( binding1    = 'Enter',
     
    1825                method_name = 'connect' ),
    1926)
     27
    2028
    2129# TraitsUI Handler class for bound methods
     
    5462
    5563if __name__ == '__main__':
    56     name = ''
    57     if len(sys.argv) == 2:
    58         name = sys.argv[1]
    59     probe = Probe(name=name)
     64    #pv = ''
     65    #if len(sys.argv) == 2:
     66    #    pv = sys.argv[1]
     67    parser = argparse.ArgumentParser(description="traits_probe")
     68    parser.add_argument('pv', action='store', nargs='?', help="EPICS PV name", default="EpicsDemo1")
     69    results = parser.parse_args()
     70
     71    probe = Probe(name=results.pv)
    6072    probe.configure_traits()
Note: See TracChangeset for help on using the changeset viewer.