Changeset 833


Ignore:
Timestamp:
Apr 26, 2012 10:30:26 AM (10 years ago)
Author:
jemian
Message:

uniform use of _demo_() method

Location:
moxy/trunk/src/moxy
Files:
1 added
9 edited

Legend:

Unmodified
Added
Removed
  • moxy/trunk/src/moxy/m_axis.py

    r780 r833  
    123123
    124124
    125 # - - - - - - - - - - - - - - - - - - main
    126 
    127 
    128 if __name__ == '__main__':
     125def _demo_():
     126    '''demonstrate use of this module'''
    129127    from time import sleep
    130128    pv = "prj:m1"
     
    158156    __demo_waitmove(non_motor.axis, position=1.1, seconds=5)
    159157    non_motor.disconnect()
     158
     159# - - - - - - - - - - - - - - - - - - main
     160
     161
     162if __name__ == '__main__':
     163    _demo_()
  • moxy/trunk/src/moxy/m_pv.py

    r780 r833  
    167167
    168168
    169 # - - - - - - - - - - - - - - - - - - main
    170 
    171 
    172 if __name__ == '__main__':
     169def _demo_():
     170    '''demonstrate use of this module'''
    173171    pv = "prj:m1"
    174172    if not pvIsAvailable(pv):
     
    184182    sleep(2.5)
    185183    __demo_waitmove(pv, position=1.1, seconds=5)
     184
     185# - - - - - - - - - - - - - - - - - - main
     186
     187
     188if __name__ == '__main__':
     189    _demo_()
  • moxy/trunk/src/moxy/m_set.py

    r781 r833  
    9191# - - - - - - - - - - - - - - - - - - methods
    9292
    93 
    94 # - - - - - - - - - - - - - - - - - - main
    95 
    96 
    97 if __name__ == '__main__':
     93def _demo_():
     94    '''demonstrate use of this module'''
    9895    aset = AxesSet(
    9996        name = 'test motion axes set',
     
    111108    aset.connect()
    112109    aset.report()
     110
     111# - - - - - - - - - - - - - - - - - - main
     112
     113
     114if __name__ == '__main__':
     115    _demo_()
  • moxy/trunk/src/moxy/m_settings.py

    r780 r833  
    8686# - - - - - - - - - - - - - - - - - - methods
    8787
    88 
    89 # - - - - - - - - - - - - - - - - - - main
    90 
    91 
    92 if __name__ == '__main__':
     88def _demo_():
     89    '''demonstrate use of this module'''
    9390    row = Row()
    9491    print row.label
     
    9895    tbl.add_row()
    9996    print [r.label for r in tbl.rows]
     97
     98# - - - - - - - - - - - - - - - - - - main
     99
     100
     101if __name__ == '__main__':
     102    _demo_()
  • moxy/trunk/src/moxy/paxis.py

    r780 r833  
    135135# - - - - - - - - - - - - - - - - - - methods
    136136
    137 
    138 # - - - - - - - - - - - - - - - - - - main
    139 
    140 
    141 if __name__ == '__main__':
    142     '''show how to use this class'''
     137def _demo_():
     138    '''demonstrate use of this module'''
    143139    s = 'prj:m2.'
    144140    m1 = PAxis(s+'VAL', s+'RBV', s+'DESC', s+'EGU', s+'DMOV', s+'STOP')
     
    151147    print m1._nonpvs
    152148    print m1._init
     149
     150# - - - - - - - - - - - - - - - - - - main
     151
     152
     153if __name__ == '__main__':
     154    _demo_()
  • moxy/trunk/src/moxy/template.py

    r780 r833  
    3434# - - - - - - - - - - - - - - - - - - methods
    3535
     36def _demo_():
     37    '''demonstrate use of this module'''
     38    pass
     39
    3640
    3741# - - - - - - - - - - - - - - - - - - main
     
    3943
    4044if __name__ == '__main__':
    41     pass
     45    _demo_()
  • moxy/trunk/src/moxy/vc_axis.py

    r781 r833  
    1919# - - - - - - - - - - - - - - - - - - Imports
    2020
    21 
    22 import wx
     21import wx                   #@UnusedImport
    2322import wx.lib.buttons
    2423import wx.lib.stattext
     
    755754
    756755
    757 # - - - - - - - - - - - - - - - - - - main
    758 
    759 
    760 if __name__ == '__main__':
     756def _demo_():
     757    '''demonstrate use of this module'''
    761758    axis = m_axis.SingleAxis( name='test axis', val='prj:m1' )
    762759    app = wx.App()
    763760    DemoFrame( None, axis ).Show()
    764761    app.MainLoop()
     762
     763
     764# - - - - - - - - - - - - - - - - - - main
     765
     766
     767if __name__ == '__main__':
     768    _demo_()
  • moxy/trunk/src/moxy/vc_pv.py

    r758 r833  
    2020
    2121
    22 import wx
     22import wx                   #@UnusedImport
    2323import wx.lib.buttons
    2424import wx.lib.stattext
     
    249249
    250250
    251 # - - - - - - - - - - - - - - - - - - main
    252 
    253 
    254 if __name__ == '__main__':
     251def _demo_():
     252    '''demonstrate use of this module'''
    255253    app = wx.App()
    256254    fr = DemoView('Godzilla')
     
    261259    fr.Show()
    262260    app.MainLoop()
     261
     262
     263# - - - - - - - - - - - - - - - - - - main
     264
     265
     266if __name__ == '__main__':
     267    _demo_()
  • moxy/trunk/src/moxy/vc_set.py

    r781 r833  
    2020
    2121
    22 import wx
    23 import wx.lib.buttons
    24 import wx.lib.stattext
    25 import m_pv
     22import wx                   #@UnusedImport
     23import wx.lib.buttons       #@UnusedImport
     24import wx.lib.stattext      #@UnusedImport
     25import m_pv                 #@UnusedImport
    2626import m_axis
    2727import m_set
     
    120120
    121121
    122 # - - - - - - - - - - - - - - - - - - main
    123 
    124 
    125 if __name__ == '__main__':
     122def _demo_():
     123    '''demonstrate use of this module'''
    126124    config = [
    127125        {'name': "*X*", 'val': "prj:m1", 'isMotorRecord': True},
     
    140138    app.MainLoop()
    141139
     140
     141# - - - - - - - - - - - - - - - - - - main
     142
     143
     144if __name__ == '__main__':
     145    _demo_()
Note: See TracChangeset for help on using the changeset viewer.