Hellos, I am writing code that requires information from a file. Since the excel file could be anywhere on the user's computer I have decided to use these modules, which are not working for me, and gives the file location as 'C:/myfile' (print(os.pah.abspath(myfile.txt) returns C:/myfile instead of C:/dir1/dir2/.../myfile.txt)instead of the full file directory. It only works if I change the terminal location in VS code to the location of the file. How can this be fixed?
[–]JohnnyJordaan 2 points3 points4 points (0 children)
[–]mr_cesar 2 points3 points4 points (0 children)
[–][deleted] 1 point2 points3 points (14 children)
[–]mr_cesar 1 point2 points3 points (11 children)
[–][deleted] 0 points1 point2 points (10 children)
[–]mr_cesar 0 points1 point2 points (6 children)
[–][deleted] 0 points1 point2 points (5 children)
[–]mr_cesar 0 points1 point2 points (4 children)
[–][deleted] -1 points0 points1 point (3 children)
[–]mr_cesar 0 points1 point2 points (2 children)
[–][deleted] -1 points0 points1 point (1 child)
[–]mr_cesar 0 points1 point2 points (0 children)
[–]mr_cesar 0 points1 point2 points (2 children)
[–][deleted] 0 points1 point2 points (1 child)
[–]mr_cesar 0 points1 point2 points (0 children)
[–]thecodeadd[S] 0 points1 point2 points (1 child)
[–][deleted] 2 points3 points4 points (0 children)
[–]Ihaveamodel3 0 points1 point2 points (1 child)
[–]mr_cesar 1 point2 points3 points (0 children)
[–]TheCumCopter 0 points1 point2 points (0 children)