Filesystem
Get current file directory
A complex command composed of two: os.path.dirname
and os.path.abspath
:
import os
os.path.dirname(os.path.abspath(__file__))
The command can be useful, for example, for fetching configuration from files in pre-defined locations.