0

This might be a fairly straightforward question, but given the path:

~/Desktop/SomeDirectory/

or any other directory located in a user's home directory

How do I get the absolute path to this folder? os.path.abspath just gives me the absolute path for my current working directory. But that's not what I need to work with.

1

1 Answer 1

2

You are looking for the os.path.expanduser method.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.