I am attempting to convert a relative file path to an absolute file path. I have input of path = 'text.txt'. I need to be able to determine the absolute path of 'c:/site/text.txt'.
The os.path.abspath method doesn't work since it takes the current working directory path. os.path.realpath does the same thing. I've also tried changing the current working directory, but that doesn't really do anything unless I have the full path to begin with.
I am doing this for a web server. I don't want users to have to enter the full path of the files they want to retrieve. Instead, I want to be able to navigate to the file manually if it exists.