-
Notifications
You must be signed in to change notification settings - Fork 0
/
server.py
48 lines (44 loc) · 1.28 KB
/
server.py
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
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
from _server import server
import threading,_thread
import os
import subprocess
import sys
#import tempfile
#from Queue import Queue, Empty
#from threading import Thread
#def launch_entry_console():
# if os.name == 'nt': # or use sys.platform for more specific names
# console = ['cmd.exe', '/c'] # or something
# else:
# console = ['xterm', '-e'] # specify your favorite terminal
# # emulator here
#
# cmd =t2
# return subprocess.Popen(console + cmd)
#class myThread (threading.Thread):
# def __init__(self, threadID, name, counter):
# threading.Thread.__init__(self)
# self.threadID = threadID
# self.name = name
# self.counter = counter
# def run(self):
# print ("Starting " + self.name)
# # Get lock to synchronize threads
# threadLock.acquire()
# # Free lock to release next thread
# threadLock.release()
#threadLock = threading.Lock()\
#print_lock=threading.Lock()
one=server()
one.ui()
one.main2()
#one.update_dict('123',one.pad('123'))
#t1=_thread.start_new_thread(target= one.main2())
#with print_lock:
# t1=threading.Thread(target= one.ui())
# launch_entry_console()
#threading.Thread.start(target= one.main2())
#t1.start()
#t2.start()