I have a function that takes in a path relative to the current working directory:
get_full_path('./subfolder'):
It should expand the ./ notation into the full root path, returning:
home/username/project/subfolder
Ideally I’d like a single os method that can do this.
>Solution :
Here it is in a single os method :
os.path.abspath("./some/relative/path")
Works with or without the ./ in the beginning.