Find the current directory and files directory [duplicate]
For question 1, use os. getcwd() # Get working directory and os. chdir(rD:\Steam\steamapps\common) # Set working directory I recommend using sys. argv[0] for question 2 because sys. argv is immutable and therefore always returns the current file (module object path) and not affected by os. chdir() .
more