Fix Python 2.7 compat
This commit is contained in:
parent
1878571bd1
commit
294e5820f5
|
@ -8,9 +8,12 @@ from terminatorlib.version import APP_NAME, APP_VERSION
|
|||
|
||||
import socket
|
||||
import threading
|
||||
import sys
|
||||
if sys.version_info < (3, 0):
|
||||
import SocketServer as socketserver
|
||||
else:
|
||||
import socketserver
|
||||
import code
|
||||
import sys
|
||||
import readline
|
||||
import rlcompleter
|
||||
import re
|
||||
|
|
|
@ -7,24 +7,24 @@
|
|||
>>> signalman = Signalman()
|
||||
>>> signalman.new(widget, 'test1', handler)
|
||||
1
|
||||
>>> signalman.cnxids[widget].keys()
|
||||
dict_keys(['test1'])
|
||||
>>> widget.signals.values()
|
||||
dict_values(['test1'])
|
||||
>>> list(signalman.cnxids[widget].keys())
|
||||
['test1']
|
||||
>>> list(widget.signals.values())
|
||||
['test1']
|
||||
>>> signalman.remove_widget(widget)
|
||||
>>> widget in signalman.cnxids
|
||||
False
|
||||
>>> widget.signals.values()
|
||||
dict_values([])
|
||||
>>> list(widget.signals.values())
|
||||
[]
|
||||
>>> signalman.new(widget, 'test2', handler)
|
||||
2
|
||||
>>> signalman.new(widget, 'test3', handler)
|
||||
3
|
||||
>>> signalman.remove_signal(widget, 'test2')
|
||||
>>> signalman.cnxids[widget].keys()
|
||||
dict_keys(['test3'])
|
||||
>>> widget.signals.values()
|
||||
dict_values(['test3'])
|
||||
>>> list(signalman.cnxids[widget].keys())
|
||||
['test3']
|
||||
>>> list(widget.signals.values())
|
||||
['test3']
|
||||
>>> signalman.remove_widget(widget)
|
||||
>>>
|
||||
|
||||
|
|
Loading…
Reference in New Issue