예제 #1
0
def main2():
	http_server.main()
	time.sleep( 1 )

	print "..."

	_BRAIN=BRAIN()

	t2 = threading.Thread( target=_BRAIN.run )
	t2.start()
예제 #2
0
def main():
    http_server.main(port=80)
예제 #3
0
from importlib import reload
from watchdog.observers import Observer
from watchdog.events import FileSystemEventHandler
import http_server

http_temp = http_server


class MyHandler(FileSystemEventHandler):
    def on_modified(self, event):
        if event.src_path.split('\\')[1] == 'http_server.py':
            print('Reloaded ' + event.src_path.split('\\')[1])
            try:
                reload(http_server)
            except SyntaxError:
                print('Syntax error in ' + event.src_path.split('\\')[1])
            except:
                raise


if __name__ == "__main__":
    event_handler = MyHandler()
    observer = Observer()
    observer.schedule(event_handler,
                      path=r'HTTP & CGI Servers',
                      recursive=False)
    observer.start()

    http_server.main()
예제 #4
0
def emulation():
    flashlights = {}
    main(flashlights)
    server = FlashLightServ(flashlights=flashlights)
    server.listen(9999)
예제 #5
0
#GLOBAL.NETWORK_TABLE={}
NETWORK=True
#NETWORK=False

TRAINING = True
#TRAINING = False




def init():
	pass


import http_server
http_server.main()
time.sleep( 1 )

#pyaudio
def ProcessSound( Prog , Prog_id=None ):
	global GA_NN_obj
	#global ENERGY_init

	if Prog_id != None:
		#crash()
		Prog=GA_NN_obj.Progs[ Prog_id ]

	Prog.init3()
	Prog.Prog_ORDERS=[]
	Prog.i=1