Python Forum

Full Version: creating parent path
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
IMHO, it would be nice to have some global setting that enables the creation of the path of parent directories in all functions and/or methods that try to create a filesystem object. i would end up setting it often, with an environment variable override.
#!/usr/bin/python3
import os

print(__file__)
print(os.path.realpath(__file__))
print(os.path.abspath(__file__))
what's that code for?
Wrong Thread.