Reputation: 907
In this code:
import scipy.io as scpio
scpio.loadmat('../data/file.mat')
Which path is represented by '../'
, and how can I print this path?
I am running anaconda, and I assumed that '../'
would represent the home directory in parentheses before each anaconda command prompt line, but that guess was incorrect.
Upvotes: 0
Views: 51
Reputation: 5515
You can make use of os.path.realpath
from os import path as op
op.realpath('../')
the ../
usually means the directory above your cwd
Upvotes: 3