stefan:/$ sudo -H pip3 install protobuf
[sudo] password for stefan:
Collecting protobuf
Downloading protobuf-3.1.0.post1-py2.py3-none-any.whl (347kB)
100% |████████████████████████████████| 348kB 1.3MB/s
Requirement already satisfied (use --upgrade to upgrade): setuptools in /usr/lib/python3/dist-packages (from protobuf)
Requirement already satisfied (use --upgrade to upgrade): six>=1.9 in /usr/lib/python3/dist-packages (from protobuf)
Installing collected packages: protobuf
Successfully installed protobuf-3.1.0.post1
stefan:/$ python3
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import sys
>>> sys.path.append('/home/stefan/ola/python')
>>> import ola
>>> from ola.ClientWrapper import ClientWrapper
>>>
>>> exit()
stefan:/$
stefan:~/ola/python/examples[master]$
stefan:~/ola/python/examples[master]$ python3
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ola
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: No module named 'ola'
>>>
stefan:~/ola/python/examples[master]$ export PYTHONPATH="${PYTHONPATH}:/home/stefan/ola/python/"
stefan:~/ola/python/examples[master]$ python3
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import ola
>>> ola
<module 'ola' from '/home/stefan/ola/python/ola/__init__.py'>
>>>
stefan:~/ola/python/examples[master]$
stefan:~/ola/python/examples[master]$ python3 ./ola_send_dmx.py
Success!
stefan:~/ola/python/examples[master]$ python3 ./ola_recv_dmx.py
array('B', [11, 50, 255])
array('B', [13, 50, 255])
array('B', [21, 50, 255])
array('B', [25, 50, 255])
array('B', [27, 50, 255])
array('B', [30, 50, 255])
array('B', [32, 50, 255])
array('B', [34, 50, 255])
array('B', [35, 50, 255])
array('B', [37, 50, 255])
^CTraceback (most recent call last):
File "./ola_recv_dmx.py", line 66, in <module>
main()
File "./ola_recv_dmx.py", line 62, in main
wrapper.Run()
File "/home/stefan/ola/python/ola/ClientWrapper.py", line 278, in Run
self._ss.Run()
File "/home/stefan/ola/python/ola/ClientWrapper.py", line 195, in Run
sleep_time)
KeyboardInterrupt
stefan:~/ola/python/examples[master]$
stefan:~/ola/python/examples[master]$ python3 ./ola_simple_fade.py
Traceback (most recent call last):
File "./ola_simple_fade.py", line 69, in <module>
wrapper.AddEvent(SHUTDOWN_INTERVAL, wrapper.Stop)
File "/home/stefan/ola/python/ola/ClientWrapper.py", line 287, in AddEvent
self._ss.AddEvent(time_in_ms, callback)
File "/home/stefan/ola/python/ola/ClientWrapper.py", line 215, in AddEvent
heapq.heappush(self._events, event)
TypeError: unorderable types: _Event() < _Event()
stefan:~/ola/python/examples[master]$
stefan:~/xxxxx/ola[OLANode !]$ python3
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import olathreaded
>>> x = olathreaded.OLAThread()
>>> x.start_connection()
start_connection
run
self.state: OLAThread_States.waiting
waiting for olad....
>>> get client
run ola wrapper.
>>> x.stop_connection()
stop ola wrapper.
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/stefan/xxxxx/ola/olathreaded.py", line 242, in stop_connection
self.wrapper.Stop()
File "/home/stefan/ola/python/ola/ClientWrapper.py", line 266, in Stop
self._ss.Terminate()
File "/home/stefan/ola/python/ola/ClientWrapper.py", line 114, in Terminate
self.Execute(self._Stop)
File "/home/stefan/ola/python/ola/ClientWrapper.py", line 106, in Execute
os.write(self._local_socket[1], 'a')
TypeError: a bytes-like object is required, not 'str'
>>> exit()
^CException ignored in: <module 'threading' from '/usr/lib/python3.5/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 1288, in _shutdown
t.join()
File "/usr/lib/python3.5/threading.py", line 1054, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt
stefan:~/xxxxx/ola[OLANode !]$
os.write(self._local_socket[1], b'a')
stefan:~/xxxxx/ola[OLANode !]$ export PYTHONPATH=$PYTHONPATH:/home/stefan/ola/python/
stefan:~/xxxxx/ola[OLANode !]$ python3
Python 3.5.2 (default, Sep 10 2016, 08:21:44)
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import olathreaded
>>> x = olathreaded.OLAThread()
>>> x.start_connection()
start_connection
run
self.state: OLAThread_States.waiting
waiting for olad....
>>> get client
run ola wrapper.
>>> x.stop_connection()
stop ola wrapper.
join thread:
^CTraceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/stefan/xxxxx/ola/olathreaded.py", line 246, in stop_connection
self.join()
File "/usr/lib/python3.5/threading.py", line 1054, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt
>>>
^CException ignored in: <module 'threading' from '/usr/lib/python3.5/threading.py'>
Traceback (most recent call last):
File "/usr/lib/python3.5/threading.py", line 1288, in _shutdown
t.join()
File "/usr/lib/python3.5/threading.py", line 1054, in join
self._wait_for_tstate_lock()
File "/usr/lib/python3.5/threading.py", line 1070, in _wait_for_tstate_lock
elif lock.acquire(block, timeout):
KeyboardInterrupt
stefan:~/xxxxx/ola[OLANode !]$