from Server.server import Server from Data.Binance import Binance b = Binance("BNBBTC") s = Server(b, stock=0, balance=1, after_trade=20) s.run(time_to_repeat=519, delay_in_seconds=1)
# Support pyinstaller wrapped program. arguments = argv[1:] else: arguments = argv argument_line = u' '.join(arguments) executable = sys.executable ret = shell32.ShellExecuteW(None, u"runas", executable, argument_line, None, 1) if int(ret) <= 32: return False return None def runAnalyzer(): proc = subprocess.Popen([sys.executable, "Static/analyzer.py"], shell=False) proc.communicate() #shell32 = ctypes.windll.shell32 #ret = shell32.ShellExecuteW(None, u"runas", sys.executable, "Static/analyzer.py", None, 1) if __name__ == "__main__": if os.name == 'nt': # Should not be run at Linux run_as_admin() threading.Thread(target=runAnalyzer).start() server = Server(ip='127.0.0.1', port=8888) server.run()