micropython-lib/os.path/os/path.py

21 wiersze
364 B
Python
Czysty Zwykły widok Historia

2014-05-09 20:34:23 +00:00
def normcase(s):
return s
def normpath(s):
return s
def join(*args):
# TODO: this is non-compliant
return "/".join(args)
def split(path):
if path == "":
return ("", "")
r = path.rsplit("/", 1)
if len(r) == 1:
return ("", path)
head = r[0] #.rstrip("/")
if not head:
head = "/"
return (head, r[1])