Skip to content

Commit

Permalink
bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Istvan Bozso committed Feb 10, 2020
1 parent 1975567 commit a8a090f
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions utils/path.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import os
import os.path as path
import os.path as pth
import glob
import subprocess as sub

__all__ = (
"cd", "Path",
Expand All @@ -15,7 +16,7 @@ class cd(object):

def __init__(self, path):
self.newPath, self.savedPath = (
path.expanduser(path),
pth.expanduser(path),
None
)

Expand All @@ -40,7 +41,7 @@ def __init__(self, path):

@classmethod
def joined(cls, *args):
return cls(path.join(*args))
return cls(pth.join(*args))

def mkdir(self):
p = self.path
Expand All @@ -51,7 +52,7 @@ def mkdir(self):
return Path(p)

def join(self, *args):
return Path(path.join(self.path, *args))
return Path(pth.join(self.path, *args))

def iglob(self):
return glob.iglob(self.path)
Expand All @@ -60,10 +61,10 @@ def glob(self):
return tuple(self.iglob())

def exists(self):
return path.exists(self.path)
return pth.exists(self.path)

def isfile(self):
return path.isfile(self.path)
return pth.isfile(self.path)

def __str__(self):
return self.path
Expand Down

0 comments on commit a8a090f

Please sign in to comment.