Skip to content

Commit

Permalink
Merge pull request openai#118 from aaronsnoswell/native-windows-support
Browse files Browse the repository at this point in the history
Use os.sep for path separators
  • Loading branch information
bchess authored Jun 28, 2019
2 parents 1cbb9a7 + 667bb5a commit 2523ee9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spinup/utils/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ def get_all_datasets(all_logdirs, legend=None, select=None, exclude=None):
"""
logdirs = []
for logdir in all_logdirs:
if osp.isdir(logdir) and logdir[-1]=='/':
if osp.isdir(logdir) and logdir[-1]==os.sep:
logdirs += [logdir]
else:
basedir = osp.dirname(logdir)
fulldir = lambda x : osp.join(basedir, x)
prefix = logdir.split('/')[-1]
prefix = logdir.split(os.sep)[-1]
listdir= os.listdir(basedir)
logdirs += sorted([fulldir(x) for x in listdir if prefix in x])

Expand Down

0 comments on commit 2523ee9

Please sign in to comment.