Try another way of appending the events module to sys.path

Still not quite right.  The IDE wants to remove the 'unused' import,
and trying to append the sys.path able the 'import sepa_mm_bot'
also makes the IDE unhappy.
This commit is contained in:
ghubstan 2022-03-16 19:21:39 -03:00
parent c3850d91c3
commit db419e0bdd
No known key found for this signature in database
GPG Key ID: E35592D6800A861E
2 changed files with 6 additions and 6 deletions

View File

@ -0,0 +1,5 @@
import os
import sys
DIR_PATH = os.path.dirname(os.path.abspath(__file__))
sys.path.append(os.path.join(DIR_PATH, 'events'))

View File

@ -1,16 +1,11 @@
import configparser
import sys
import threading
from decimal import *
from pathlib import Path
from tkinter import *
# Append the events pkg to the system path before importing the sepa_mm_bot.
# TODO Is there a better way to do this?
sys.path.append('events')
import path_config
import sepa_mm_bot
from events.event_dispatcher import EventDispatcher
from events.trade_event import TradeEvent
from logger import log