Repository navigation
Expand file tree
/
Copy pathstart_client.py
More file actions
71 lines (52 loc) · 1.67 KB
/
Copy pathstart_client.py
File metadata and controls
71 lines (52 loc) · 1.67 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
## -*- coding: utf-8 -*-
################################################################################
##
## Copyright 2010 Philipp Meier <pmeier82@googlemail.com>
##
## Licensed under the EUPL, Version 1.1 or – as soon they will be approved by
## the European Commission - subsequent versions of the EUPL (the "Licence");
## You may not use this work except in compliance with the Licence.
## You may obtain a copy of the Licence at:
##
## http://ec.europa.eu/idabc/eupl
##
## Unless required by applicable law or agreed to in writing, software
## distributed under the Licence is distributed on an "AS IS" basis,
## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
## See the Licence for the specific language governing permissions and
## limitations under the Licence.
##
################################################################################
#
# nsim - start_client.py
#
# Philipp Meier - <pmeier82 at gmail dot com>
# 2010-03-18
#
# $Id: start.py 4925 2010-07-29 19:45:54Z phil $
#
"""positioning of tetrodes"""
__docformat__ = 'restructuredtext'
##---IMPORTS
from PyQt4 import QtGui
from nsim.data_io import MinimalClient
##---CLASSES
class SimpleClient(MinimalClient):
"""test client"""
def handle_data(self, signal, noise, gtrth):
"""abstract handler"""
try:
self.dataplot.set_data(signal)
except Exception, ex:
print
print ex
##---MAIN
def main(ip_str='localhost'):
app = QtGui.QApplication([])
win = SimpleClient(addr=(ip_str, 31337))
win.initialize()
win.show()
return app.exec_()
if __name__ == '__main__':
import sys
sys.exit(main())