← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #288674]: appending sys.path with a relative path

 

Question #288674 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/288674

    Status: Open => Answered

RaiMan proposed the following answer:
if it helps:
os.path.dirname(currentPath)

strips the last portion in the path, that is not terminated with a
slash/backslash.

BTW: you can work totally with forward slashes instead of backslashes to
avoid the various methods to tell Jython about backslashes.

so 
print os.path.dirname("C:/xy/mydir")

should print
C:/xy

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.