Restructered and thread for reader
This commit is contained in:
22
main.py
Normal file
22
main.py
Normal file
@@ -0,0 +1,22 @@
|
||||
from src import gui
|
||||
from src import trader
|
||||
from threading import Thread
|
||||
from argparse import Namespace, ArgumentParser
|
||||
|
||||
def setup_args() -> Namespace:
|
||||
parser = ArgumentParser(
|
||||
description='Poe Trader', epilog="And that's how you trade")
|
||||
|
||||
parser.add_argument(
|
||||
'-l', '--logfile', help='Path of the logfile that should be used', default=r'D:\Poe\logs\Client.txt')
|
||||
|
||||
return parser.parse_args()
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
args = setup_args()
|
||||
app = gui.Gui()
|
||||
my_thread = Thread(target=trader.read_log, args=(args.logfile, app))
|
||||
my_thread.start()
|
||||
# read_log(args.logfile)
|
||||
app.mainloop()
|
||||
Reference in New Issue
Block a user