Ignore:
Timestamp:
Oct 15, 2013 8:22:10 PM (10 years ago)
Author:
jemian
Message:

figured out how to create and install starter scripts using setup.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bcdaqwidgets/trunk/src/bcdaqwidgets_demos/pyside_probe.py

    r1402 r1443  
    11#!/usr/bin/env python
    22
    3 ########### SVN repository information ###################
    4 # $Date$
    5 # $Author$
    6 # $Revision$
    7 # $URL$
    8 # $Id$
    9 ########### SVN repository information ###################
     3'''
     4PySide implementation of EPICS probe
    105
    11 # from Matt Newville, CARS, University of Chicago
     6:author: Matt Newville, CARS, University of Chicago
     7:note: Does not use bcdaqwidgets
     8'''
    129
    1310import epics
     
    1613from PySide.QtGui import QWidget, QLabel, QLineEdit, QGridLayout, QApplication
    1714
    18 sys.path.insert(0, os.path.abspath('..'))
    19 import bcdaqwidgets
    20 
    2115class PVProbe(QWidget):
    22     ''' '''
     16    '''frame that monitors a user-entered EPICS PV'''
    2317    def __init__(self, parent=None):
    2418        QWidget.__init__(self, parent)
     
    4236
    4337    def onPVNameReturn(self):
     38        '''responds when user enters a new PV'''
    4439        if self.pv is not None:
    4540            self.pv.remove_callback()
     
    4843
    4944    def onPVChange(self, pvname=None, char_value=None, **kws):
     45        '''updates the widget (not thread-safe)'''
    5046        self.value.setText(char_value)
    5147
    52 if __name__ == '__main__':
     48
     49def main():
    5350    app = QApplication(sys.argv)
    5451    probe = PVProbe()
    5552    probe.show()
    5653    sys.exit(app.exec_())
     54
     55
     56if __name__ == '__main__':
     57    main()
     58
     59
     60########### SVN repository information ###################
     61# $Date$
     62# $Author$
     63# $Revision$
     64# $URL$
     65# $Id$
     66########### SVN repository information ###################
Note: See TracChangeset for help on using the changeset viewer.