Skip to content

Commit

Permalink
create folders if not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
letianzj committed Aug 21, 2020
1 parent dbadd78 commit 4160365
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/live_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,11 @@ def main(config_file):
except IOError:
print("config.yaml is missing")

required_dirs = ['./log/', './tick/', './strategy/']
for d in required_dirs:
if not os.path.exists(d):
os.makedirs(d)

_logger = logging.getLogger('quanttrading2')
_logger.setLevel(logging.DEBUG)
handler1 = logging.StreamHandler()
Expand Down

0 comments on commit 4160365

Please sign in to comment.