What do you want to save?
Add Code snippet
New code examples
-
Python 2021-11-20 13:36:16
__file__ python
A = os.path.join(os.path.dirname(__file__), '..') # A is the parent directory of the directory where program resides. B = os.path.dirname(os.path.realpath(__file__)) # B is the canonicalised (?) directory where the program resides. C = os.path.abspath(o... Add solution -
Python 2021-11-19 15:43:18
os path splitext
import os os.path.dirname(os.path.realpath(__file__)) Add solution -
Python 2021-09-06 15:54:05
get path from file path python
import os os.path.realpath(__file__) Add solution