|
@@ -23,6 +23,7 @@ along with librelight. If not, see <http://www.gnu.org/licenses/>.
|
|
|
"""
|
|
|
|
|
|
import sys
|
|
|
+
|
|
|
if sys.version_info.major <= 2:
|
|
|
print("exit Python3 is needet")
|
|
|
sys.exit()
|
|
@@ -38,13 +39,12 @@ if "__file__" in dir():
|
|
|
else:
|
|
|
sys.stdout.write("\x1b]2;"+str("__file__")+"\x07") # terminal title
|
|
|
|
|
|
+import json
|
|
|
+import os
|
|
|
import string
|
|
|
import time
|
|
|
-import os
|
|
|
-
|
|
|
-import json
|
|
|
-
|
|
|
from optparse import OptionParser
|
|
|
+
|
|
|
parser = OptionParser()
|
|
|
parser.add_option("-r", "--recive", dest="recive",
|
|
|
help="set recive ip like --recive 10.")
|
|
@@ -71,6 +71,7 @@ if cython:
|
|
|
|
|
|
from collections import OrderedDict
|
|
|
from datetime import datetime
|
|
|
+
|
|
|
#print(dir())
|
|
|
#input()
|
|
|
# ============================================================
|
|
@@ -145,6 +146,8 @@ def count_active_dmx_ch(dmx):
|
|
|
# Text Grafik Curses =========================================
|
|
|
# ============================================================
|
|
|
import curses
|
|
|
+
|
|
|
+
|
|
|
class CursesDummy():
|
|
|
def __init__(self):
|
|
|
self.sel_host=Pager()
|
|
@@ -704,15 +707,19 @@ class HostBuffer():
|
|
|
# ============================================================
|
|
|
# Network ====================================================
|
|
|
# ============================================================
|
|
|
-import socket, struct
|
|
|
+import socket
|
|
|
+import struct
|
|
|
+
|
|
|
hostname = socket.gethostname()
|
|
|
netns = "none"
|
|
|
x = os.popen("ip netns identify $$")
|
|
|
xx = x.read()
|
|
|
if xx:
|
|
|
netns = xx.strip()
|
|
|
-import fcntl #socket control
|
|
|
import errno
|
|
|
+import fcntl # socket control
|
|
|
+
|
|
|
+
|
|
|
def toPrintable(nonprintable):
|
|
|
out = ""
|
|
|
|
|
@@ -898,10 +905,11 @@ class IN_Socket():
|
|
|
# ============================================================
|
|
|
|
|
|
|
|
|
-import time
|
|
|
+import random
|
|
|
import socket
|
|
|
import struct
|
|
|
-import random
|
|
|
+import time
|
|
|
+
|
|
|
|
|
|
class ArtNetNode():
|
|
|
"""simple Object to generate raw ArtNet like Network packages
|