BenBrostoff / draftfast

A tool to automate and optimize DraftKings and FanDuel lineup construction.
287 stars 113 forks source link

Use dynamic paths for files #29

Closed kacperadach closed 5 years ago

kacperadach commented 7 years ago

It would be v nice if we could no longer use code to open files such as:

open('data/current-salaries.csv', 'r')

With this being used as a submodule in the other repo, I get errors related to paths all the time. Instead if we could use python's os.path to get the path relative to the file the code is in then it could be guaranteed to work.

path.join(path.split(path.realpath(__file__))[0],  'data', 'current-salaries.csv')
BenBrostoff commented 5 years ago

Closing because this is no longer applicable to the current API.