My script.py creates a temporary file in the same dir as the script.
When running it:
python script.py
it works just file
b
You can use the os.getcwd() method to know the current working directory.
Return a string representing the current working directory. Availability: Unix, Windows.
You can use the os.chdir(path) method to change the current working directory.
Change the current working directory to path. Availability: Unix, Windows.